MadAppGang / identifo

Universal authentication framework for web, created with go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Identifo server-config.yaml file: Latest working config doc

kazemisoroush opened this issue · comments

Here is an example of working configuration with latest Identifo version. Needs an update in docs and sample code:

general:
    host: http://server
    port: 80
    issuer: http://server
    algorithm: es256
adminAccount:
    loginEnvName: IDENTIFO_ADMIN_LOGIN
    passwordEnvName: IDENTIFO_ADMIN_PASSWORD
storage:
    appStorage:
        type: mongodb
        mongo:
            connection: mongodb+srv://user:pass@cluster.mongodb.net/database
            database: database
    userStorage:
        type: mongodb
        mongo:
            connection: mongodb+srv://user:pass@cluster.mongodb.net/database
            database: database
    tokenStorage:
        type: mongodb
        mongo:
            connection: mongodb+srv://user:pass@cluster.mongodb.net/database
            database: database
    tokenBlacklist:
        type: mongodb
        mongo:
            connection: mongodb+srv://user:pass@cluster.mongodb.net/database
            database: database
    verificationCodeStorage:
        type: mongodb
        mongo:
            connection: mongodb+srv://user:pass@cluster.mongodb.net/database
            database: database
    inviteStorage:
        type: mongodb
        mongo:
            connection: mongodb+srv://user:pass@cluster.mongodb.net/database
            database: database
sessionStorage:
    type: memory
    sessionDuration: 300
static:
    type: s3
    s3:
        region: ap-southeast-2
        bucket: bucket-name
        folder: ./static
    serveAdminPanel: true
services:
    email:
        type: ses
        ses:
            region: ap-southeast-2
            sender: noreply@service.com.au
    sms:
        type: twilio
        twilio:
            accountSid: account-sid
            authToken: auth-token
            serviceSid: service-sid
login:
    loginWith:
        username: true
        phone: true
        email: true
        federated: false
    tfaType: sms
keyStorage:
    type: s3
    s3:
        region: ap-southeast-2
        bucket: bucket-name
        private_key_key: ./keys/rsa_private.pem
        public_key_key: ./keys/rsa_public.pem
config:
    type: s3
    s3:
        region: ap-southeast-2
        bucket: bucket-name
        key: server-config.yaml
logger:
    file_name: logs

Although, there is an issue with regards to the services.email.type path at the moment. When storing this path on the Identifo side, it validates the field to be equal to ses but when using it, it's expecting to see aws ses instead. There seems to be an inconsistency between what is expected to be stored and used.

Also, propose that we make it possible to explicitly define the login user/pass pair in the config file as well as the ability to specify env variables:

adminAccount:
    loginEnvName: IDENTIFO_ADMIN_LOGIN
    passwordEnvName: IDENTIFO_ADMIN_PASSWORD
    loginUser: the-username
    loginPass: the-password