Documentation

Sources for authentication and authorization

backends

The backends block tells where end user information is stored. Each backend is be configured with a string representing the backend's name. Backends are configured within the backends block:

backends {
    mysql "MY_DB" {
        query "FIND_USER" {
            # SQL statement
            statement "SELECT USERID, PASSWORD FROM USERIDS WHERE USERID = ?";

            # Query argument binding in order
            bindings {
                aaa.identity;
            }

            # Result value mapping
            mapping {
                user.username = USERID;
                user.password = PASSWORD;
            }
        }
    }
}

Calling backends

Backends are called with the backend action

backend {
    name "EXAMPLE_FILE_BACKEND";
    query "FIND_USER";
}

Some backends may expose different queries. The way of defining backend queries is backend specific. For example, SQL backends use the query block to define SQL queries.

If the backend does not support multiple queries, the query name may be omitted.

Execution context modification

Most backends allow modifying the execution context. For example, SQL backends allow binding query arguments from the execution context and mapping query results back to the execution context as shown above.