@@ -294,6 +294,85 @@ See the documentation on ``LDAPAuthenticator`` for more details.
294294
295295 authenticators.LDAPAuthenticator
296296
297+ OIDC Authenticator
298+ ++++++++++++++++++
299+
300+ ``OIDCAuthenticator `` integrates the server with third-party OpenID Connect providers
301+ such as Google, Microsoft Entra ID, ORCID and others. The server does not process user
302+ passwords directly: authentication is delegated to the provider and the server validates
303+ the returned OIDC token.
304+
305+ General setup steps:
306+
307+ #. Register an application with the OIDC provider.
308+ #. Configure redirect URIs for the provider application. For provider name ``entra `` and
309+ host ``https://your-server.example `` the redirect URIs are:
310+
311+ - ``https://your-server.example/api/auth/provider/entra/code ``
312+ - ``https://your-server.example/api/auth/provider/entra/device_code ``
313+
314+ #. Store the client secret in environment variable and reference it in config.
315+ #. Use provider's ``.well-known/openid-configuration `` URL.
316+
317+ Typical ``well_known_uri `` values:
318+
319+ - Google: ``https://accounts.google.com/.well-known/openid-configuration ``
320+ - Microsoft Entra ID: ``https://login.microsoftonline.com/<tenant-id>/v2.0/.well-known/openid-configuration ``
321+ - ORCID: ``https://orcid.org/.well-known/openid-configuration ``
322+
323+ Example configuration (Microsoft Entra ID)::
324+
325+ authentication:
326+ providers:
327+ - provider: entra
328+ authenticator: bluesky_httpserver.authenticators:OIDCAuthenticator
329+ args:
330+ audience: 00000000-0000-0000-0000-000000000000
331+ client_id: 00000000-0000-0000-0000-000000000000
332+ client_secret: ${BSKY_ENTRA_SECRET}
333+ well_known_uri: https://login.microsoftonline.com/<tenant-id>/v2.0/.well-known/openid-configuration
334+ confirmation_message: "You have logged in successfully."
335+ api_access:
336+ policy: bluesky_httpserver.authorization:DictionaryAPIAccessControl
337+ args:
338+ users:
339+ <login-name>:
340+ roles:
341+ - admin
342+ - expert
343+
344+ Example configuration (Google)::
345+
346+ authentication:
347+ providers:
348+ - provider: google
349+ authenticator: bluesky_httpserver.authenticators:OIDCAuthenticator
350+ args:
351+ audience: <google-client-id>
352+ client_id: <google-client-id>
353+ client_secret: ${BSKY_GOOGLE_SECRET}
354+ well_known_uri: https://accounts.google.com/.well-known/openid-configuration
355+ api_access:
356+ policy: bluesky_httpserver.authorization:DictionaryAPIAccessControl
357+ args:
358+ users:
359+ <login-name>:
360+ roles: user
361+
362+ .. note ::
363+
364+ The name used in ``api_access/args/users `` must match the identity string produced by
365+ the authenticator for your provider configuration. Verify with ``/api/auth/whoami `` after
366+ successful login.
367+
368+ See the documentation on ``OIDCAuthenticator `` for parameter details.
369+
370+ .. autosummary ::
371+ :nosignatures:
372+ :toctree: generated
373+
374+ authenticators.OIDCAuthenticator
375+
297376
298377Expiration Time for Tokens and Sessions
299378+++++++++++++++++++++++++++++++++++++++
0 commit comments