soar-authentication-identity

Used by authentication service to translate an identity identifier into an UUID

Domain analysis

Quickstart

Staff identity provider

Example using the factory.

> identity = Soar::Authentication::Identity::Factory.create({
    authenticated_identifier: '[email protected]',
    directory_configurations:  {
        staff: {
            "class" => 'Soar::Registry::Directory::Provider::Stub',
            "config" => {
                table: "identity",
                index: ["uuid", "email"]
            }
        },
        customer: {},
        domain: {}
    }
})
> puts identity.uuid
"85777bfa-b743-4ba9-8308-e8a1e4d44fbe"
> puts identity.role
'staff'

Tests

Local

Identity factory

$ bundle exec rspec

Stub identity provider

$ TEST_ORCHESTRATION_PROVIDER=Stub cucumber

Staff identity provider

$ docker-compose --file docker-compose.ldap.yml up --remove-orphans
$ CONFIG_FILE=config.ldap.yml TEST_ORCHESTRATION_PROVIDER=Staff cucumber

Customer identity provider

Not implemented

Domain identity provider

Not implemented

CI

Stub identity provider

docker-compose --file docker-compose.ci.stub.yml up --abort-on-container-exit --remove-orphans
EXIT_CODE=$(docker ps -a -f "name=soar-authentication-identity-provider-stub" -q | xargs docker inspect -f "{{ .State.ExitCode }}");
exit $EXIT_CODE;

Staff identity provider

docker-compose --file docker-compose.ci.staff.yml up --abort-on-container-exit --remove-orphans
EXIT_CODE=$(docker ps -a -f "name=soar-authentication-identity-provider-staff" -q | xargs docker inspect -f "{{ .State.ExitCode }}");
exit $EXIT_CODE;