You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: modules/authentication/proc-enabling-authentication-with-github.adoc
+58-46
Original file line number
Diff line number
Diff line change
@@ -64,17 +64,17 @@ TIP: If you plan to make changes using the GitHub API, ensure that `Read and wri
64
64
`GITHUB_WEBHOOK_SECRET`:: Enter the saved *Webhook secret*.
65
65
66
66
. To set up the GitHub authentication provider and enable integration with the GitHub API in your {product-short} custom configuration, edit your custom {product-short} ConfigMap such as `app-config-rhdh`, and add the following lines to the `app-config-rhdh.yaml` content:
67
+
.. Configure mandatory fields:
67
68
+
68
-
--
69
69
.`app-config-rhdh.yaml` fragment with mandatory fields to enable authentication with GitHub
70
70
[source,yaml]
71
71
----
72
72
auth:
73
-
environment: production
73
+
environment: production # <1>
74
74
providers:
75
75
github:
76
76
production:
77
-
clientId: ${AUTH_GITHUB_CLIENT_ID}
77
+
clientId: ${AUTH_GITHUB_CLIENT_ID} # <2>
78
78
clientSecret: ${AUTH_GITHUB_CLIENT_SECRET}
79
79
integrations:
80
80
github:
@@ -87,49 +87,13 @@ integrations:
87
87
webhookSecret: ${GITHUB_WEBHOOK_SECRET}
88
88
privateKey: |
89
89
${GITHUB_PRIVATE_KEY_FILE}
90
-
signInPage: github
90
+
signInPage: github # <3>
91
91
----
92
+
<1> Mark the environment as `production` and disable the Guest login option in the {product-short} login page.
93
+
<2> Apply the GitHub credentials configured in your {product-short} secrets.
94
+
<3> To enable the GitHub provider as your {product-short} sign-in provider.
92
95
93
-
`environment: production`::
94
-
Mark the environment as `production` to hide the Guest login in the {product-short} home page.
To enable authentication without requiring to provision users in the {product-short} software catalog.
106
-
+
107
-
WARNING: Use `dangerouslyAllowSignInWithoutUserInCatalog` to explore {product-short} features, but do not use it in production.
108
-
+
109
-
.`app-config-rhdh.yaml` fragment with optional field to allow authenticating users absent from the software catalog
110
-
[source,yaml]
111
-
----
112
-
auth:
113
-
environment: production
114
-
providers:
115
-
github:
116
-
production:
117
-
clientId: ${AUTH_GITHUB_CLIENT_ID}
118
-
clientSecret: ${AUTH_GITHUB_CLIENT_SECRET}
119
-
integrations:
120
-
github:
121
-
- host: ${GITHUB_HOST_DOMAIN}
122
-
apps:
123
-
- appId: ${AUTH_GITHUB_APP_ID}
124
-
clientId: ${AUTH_GITHUB_CLIENT_ID}
125
-
clientSecret: ${GITHUB_CLIENT_SECRET}
126
-
webhookUrl: ${GITHUB_WEBHOOK_URL}
127
-
webhookSecret: ${GITHUB_WEBHOOK_SECRET}
128
-
privateKey: |
129
-
${GITHUB_PRIVATE_KEY_FILE}
130
-
signInPage: github
131
-
dangerouslyAllowSignInWithoutUserInCatalog: true
132
-
----
96
+
.. Optional: Consider adding the following optional fields:
133
97
134
98
`callbackUrl`::
135
99
The callback URL that GitHub uses when initiating an OAuth flow, such as: __<your_intermediate_service_url/handler>__.
@@ -175,6 +139,56 @@ auth:
175
139
sessionDuration: { hours: 24 }
176
140
----
177
141
142
+
`signIn` ::
143
+
144
+
`resolvers`:::
145
+
After successful authentication, the user signing in must be resolved to an existing user in the {product-short} catalog. To best match users securely for your use case, consider configuring a specific resolver. Enter the resolver list to override the default resolver: `usernameMatchingUserEntityName`.
146
+
+
147
+
The authentication provider tries each sign-in resolver in order until it succeeds, and fails if none succeed.
148
+
+
149
+
WARNING: In production mode, only configure one resolver to ensure users are securely matched.
To enable authentication without requiring to provision users in the {product-short} software catalog.
84
-
+
85
-
WARNING: Use `dangerouslyAllowSignInWithoutUserInCatalog` to explore {product-short} features, but do not use it in production.
86
-
+
87
-
.`app-config-rhdh.yaml` fragment with optional field to allow authenticating users absent from the software catalog
88
-
[source,yaml]
89
-
----
90
-
auth:
91
-
environment: production
92
-
providers:
93
-
microsoft:
94
-
production:
95
-
clientId: ${AUTH_AZURE_CLIENT_ID}
96
-
clientSecret: ${AUTH_AZURE_CLIENT_SECRET}
97
-
tenantId: ${AUTH_AZURE_TENANT_ID}
98
-
signInPage: microsoft
99
-
dangerouslyAllowSignInWithoutUserInCatalog: true
100
-
----
73
+
.. Optional: Consider adding following optional fields:
101
74
102
75
`domainHint`::
103
76
Optional for single-tenant applications.
@@ -148,7 +121,45 @@ auth:
148
121
sessionDuration: { hours: 24 }
149
122
----
150
123
151
-
--
124
+
`signIn` ::
125
+
126
+
`resolvers`:::
127
+
After successful authentication, the user signing in must be resolved to an existing user in the {product-short} catalog. To best match users securely for your use case, consider configuring a specific resolver. Enter the resolver list to override the default resolver: `emailLocalPartMatchingUserEntityName`.
128
+
+
129
+
The authentication provider tries each sign-in resolver in order until it succeeds, and fails if none succeed.
130
+
+
131
+
WARNING: In production mode, only configure one resolver to ensure users are securely matched.
0 commit comments