Skip to content

Commit c948540

Browse files
authored
fix: Bootstrap the default single tenant on when we are using onelogin as an IDP (#5279)
1 parent fcc7fab commit c948540

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

keep/api/config.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,19 @@ def on_starting(server=None):
5858
IdentityManagerTypes.DB.value,
5959
IdentityManagerTypes.NOAUTH.value,
6060
IdentityManagerTypes.OAUTH2PROXY.value,
61+
IdentityManagerTypes.ONELOGIN.value,
6162
"no_auth", # backwards compatibility
6263
"single_tenant", # backwards compatibility
6364
]:
65+
excluded_from_default_user = [
66+
IdentityManagerTypes.OAUTH2PROXY.value,
67+
IdentityManagerTypes.ONELOGIN.value,
68+
]
6469
# for oauth2proxy, we don't want to create the default user
6570
try_create_single_tenant(
6671
SINGLE_TENANT_UUID,
6772
create_default_user=(
68-
False if AUTH_TYPE == IdentityManagerTypes.OAUTH2PROXY.value else True
73+
False if AUTH_TYPE in excluded_from_default_user else True
6974
),
7075
)
7176

0 commit comments

Comments
 (0)