Skip to content

Commit ba48b5a

Browse files
authored
base: enable RHSSOAuthentication by default (#1736)
Don't rely on the state of the deprecated `ANSIBLE_AI_ENABLE_TECH_PREVIEW` key.
1 parent 7347ea3 commit ba48b5a

File tree

1 file changed

+1
-6
lines changed
  • ansible_ai_connect/main/settings

1 file changed

+1
-6
lines changed

ansible_ai_connect/main/settings/base.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,7 @@ def is_ssl_enabled(value: str) -> bool:
275275
"DEFAULT_AUTHENTICATION_CLASSES": [
276276
"oauth2_provider.contrib.rest_framework.OAuth2Authentication",
277277
"rest_framework.authentication.SessionAuthentication",
278+
"ansible_ai_connect.users.auth.RHSSOAuthentication",
278279
"ansible_ai_connect.users.authentication.LightspeedJWTAuthentication",
279280
],
280281
"DEFAULT_PERMISSION_CLASSES": ["rest_framework.permissions.IsAuthenticated"],
@@ -325,12 +326,6 @@ def is_ssl_enabled(value: str) -> bool:
325326
RESOURCE_SERVER__VALIDATE_HTTPS = os.getenv("RESOURCE_SERVER__VALIDATE_HTTPS")
326327
# ==========================================
327328

328-
# Current RHSSOAuthentication implementation is incompatible with tech preview terms partial
329-
if not ANSIBLE_AI_ENABLE_TECH_PREVIEW:
330-
REST_FRAMEWORK["DEFAULT_AUTHENTICATION_CLASSES"].insert(
331-
-1, "ansible_ai_connect.users.auth.RHSSOAuthentication"
332-
)
333-
334329
ROOT_URLCONF = "ansible_ai_connect.main.urls"
335330

336331
LOGGING = {

0 commit comments

Comments
 (0)