Skip to content

Activation: add-auth

💡 TL;DR - Use add-auth to activate security

You activate security by activating authentication using the add-auth CLI command to designate the authentication-type (sql or keycloak), and its database location (db_url).

 

add-auth

Use the add-auth command to activate security. Specify:

  1. --provider-type: sql, keycloak, or your custom auth provider
  2. --db-url: the persistent store to identify valid users and their roles. These can be stores such as LDAP or Microsoft AD, or a security sql database.

 

Examples

Use your IDE's terminal window positioned at your project root:

Configure Security - Examples
als add-auth --provider-type=sql --db-url=
als add-auth --provider-type=sql --db_url=postgresql://postgres:p@localhost/authdb

als add-auth --provider-type=keycloak --db-url=localhost
als add-auth --provider-type=keycloak --db-url=hardened

 

add-auth Internal Processing

Updates config.py

Internally, this updates conf/config.py:

config

 

Creates auth models

See this information for sql authentication.

 

Appendix: Internals

The Security Manager and sqlite Authentication-Provider are built into created projects from the system's prototype project.