Using Keycloak SSO

It is done working now. I now can login with Keycloak into my Indico installation.

Thank you so much you are very helpful.

Final version of indico.conf was in case some others might have similar case.

# Keycloak
LOCAL_IDENTITIES = False
LOCAL_REGISTRATION = False
EXTERNAL_REGISTRATION_URL = 'https://xxx:8443/auth/realms/Indico/account/'

AUTH_PROVIDERS = {
    'keycloak': {
        'type': 'authlib',
        'title': 'Keycloak',
        'authlib_args': {
            'client_id': 'Indico',
            'client_secret': 'xxx',
            'server_metadata_url': 'https://xxx:8443/auth/realms/Indico/.well-known/openid-configuration',
            'client_kwargs': {'scope': 'openid'}
        }
    }
}

IDENTITY_PROVIDERS = {
    'keycloak': {
        'type': 'authlib',
        'title': 'Keycloak',
        'mapping': {
            'first_name': 'given_name',
            'last_name': 'family_name',
            'phone': 'phone_number'
        },
        'trusted_email': True,
        'synced_fields': {'first_name', 'last_name'}
    }
}
1 Like