Package: emeis
emeisA generic user management service.The word emeis ([e̞ˈmis]) comes from greek (εμείς) and meanswe.Original RFC that led to emeisConfigurationIt's important to configure the app before the first start. When running for the first
time, there is a data migration, that depends on settings from the config.emeis is a12factor appwhich means that configuration is
stored in environment variables.
Different environment variable types are explained atdjango-environ.CommonA list of configuration options which you might need to configure to get emeis started in your environment.GeneralSECRET_KEY: A secret key used for cryptography. This needs to be a random string of a certain length. Seemore.ALLOWED_HOSTS: A list of hosts/domains your service will be served from. Seemore.DatabaseDATABASE_ENGINE: Database backend to use. Seemore. (default: django.db.backends.postgresql)DATABASE_HOST: Host to use when connecting to database (default: localhost)DATABASE_PORT: Port to use when connecting to database (default: 5432)DATABASE_NAME: Name of database to use (default: emeis)DATABASE_USER: Username to use when connecting to the database (default: emeis)DATABASE_PASSWORD: Password to use when connecting to databasei18nLANGUAGE_CODE: Language code of the default language (default: en)LANGUAGES: A list of supported languages (default: [en])Additional optionsAdditional options you might want to configureMetainfo fieldsEmeis supports custom properties on all models via themetainfoJSON fields containing key-value pairs.If you want to support ordering of such custom fields, add the respective keys to theEMEIS_META_FIELDSsetting.OIDCFor OIDC, a customizedmozilla-django-oidcis used.Most of the settings below are documented in it'srespective documentation.OIDC_OP_USER_ENDPOINT: Url of userinfo endpoint (seespec)OIDC_VERIFY_SSL: Bool (default: true)OIDC_BEARER_TOKEN_REVALIDATION_TIME: Time in seconds before bearer token validity is verified again. For best security, token is validated on each request per default. It might be helpful though in case of slow Open ID Connect provider to cache it. It usescachemechanism for memorizing userinfo result. Number has to be lower than access token expiration time. (default: 0)OIDC_CREATE_USER: Enables or disables automatic user creation during authentication (default: false). If set to false, users have to be created manually in emeis with the username set to the value that will be received in theOIDC_USERNAME_CLAIM.OIDC_UPDATE_USER: Enables or disables updating of the user email address based on the email claim (default: false)OIDC_USERNAME_CLAIM: Name of claim that contains the username (default: sub). This is needed for matching users from the received claims.OIDC_EMAIL_CLAIM: Name of claim that contains the email address (default: email). This is only needed ifOIDC_CREATE_USERorOIDC_UPDATE_USERaretrueOIDC_OP_INTROSPECT_ENDPOINT: Url of introspection endpoint (optionally needed for Client Credentials Grant)OIDC_RP_CLIENT_ID: ID of the client (optionally needed for Client Credentials Grant)OIDC_RP_CLIENT_SECRET: Secret of the client (optionally needed for Client Credentials Grant)EMEIS_OIDC_USER_FACTORY: Optional, factory function (or class) that defines
an OIDC user object. See also here:Extending EmeisCacheCACHE_BACKEND:cache backendto use (default: django.core.cache.backends.locmem.LocMemCache)CACHE_LOCATION:locationof cache to useCORS headersPer default no CORS headers are set but can be configured with following options.CORS_ORIGIN_ALLOW_ALL: If True, the whitelist will not be used and all origins will be accepted. (default: False)CORS_ORIGIN_WHITELIST: A list of origin hostnames (including the scheme and with optional port) that are authorized to make cross-site HTTP requests.LoggingLOG_LEVEL: The logging level of the console logging handler (default: INFO)Anonymous writeALLOW_ANONYMOUS_WRITE: If set totrue, unauthenticated users are allowed to write data (default: false)Their request will also go through the permission layer and access can be restricted/denied from there.This setting can be handy when setting up emeis or during development, when no OIDC provider is available.This should always befalsein production environments.InstallationRequirementsdockerdocker-composeAfter installing and configuring those, downloaddocker-compose.ymland run the following command:# only needs to be run onceechoUID=$UID>.env

docker-composeup-dThis will build the containers, start the services and run the database migrations. Additionally, it
creates a user, scope, role and and ACL for administration based on the settingsdocumented aboveGetting startedYou can now access the api athttp://localhost:8000/api/v1/.Read more about extending and configuring Emeis here:Extending Emeis.ContributingLook at ourcontributing guidelinesto start with your first contribution.Maintainer's HandbookSome notes for maintaining this project can be found inthe maintainer's handbook.