35 Commits

Author SHA1 Message Date
fc988c8771 Auth: Add Azure/Entra workload identity support (#104807)
* fixes/adds azure workload identity authentication. Issue #78249

* Updates default values. Adds `workload_identity_token_file` defaults

* Updates example config. Adds `workload_identity_token_file`

* Updates docummentation: adds Federated credentials for Workload Identity

* Update docs/sources/setup-grafana/configure-security/configure-authentication/azuread/index.md

Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>

* Update docs/sources/setup-grafana/configure-security/configure-authentication/azuread/index.md

Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>

* Docs: add link to official documentation. Clarifies example.

* 1. Add workload_identity_enabled and workload_identity_token_file settings to [auth.azuread] for workload identity support.

2. Extend OAuthInfo struct to include workload identity fields.
3. Update OAuth authentication logic to handle Azure AD workload identity using federated token as client assertion.
4. Update sample configuration and documentation for new settings.

* ensure environment variable overrides are respected for OAuth SSO settings

- Ensure that settings loaded in pkg/services/ssosettings/strategies/oauth_strategy.go correctly reflect environment variable overrides, matching Grafana's config behavior.
- Align config loading logic with main config loader to prevent issues where INI values would override environment variables.

* updates documentation

* test: add workload identity configuration tests for Azure AD OAuth strategy. Add test coverage for workload_identity_enabled and workload_identity_token_file settings

* feat: add workload identity support to Azure AD SSO configuration UI

* updates documentation

* Simplify OAuth flow by removing unnecessary switch-case structure

* Small changes

* Lint + i18n gen

* refactor: remove redundant workload_identity_enabled setting as auth method gets defined by client_authentication

* update documentation

* refactor: remove redundant workload_identity_enabled setting as auth method gets defined by client_authentication

* updates documentation - configuration options table: adds `client_authentication`, `workload_identity_token_file`, and `federated_credential_audience`

* Small changes, lint, i18n

---------

Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
2025-05-29 14:09:18 +02:00
8dfb0874a0 Docs: removing docs debt in install docs (#101750)
* Docs: removing docs debt in install docs

* cleaning up set up docs debt

* fixing some vale errors

* fixing broken admonition shortcode

* fixing broken shortcode

* fixing broken shortcode

* working to the grafana authentication config

* updating some more files

* editing down to ldap in the repo

* editing ldap doc except final section with link needed

* Finishing doc debt cleanup through configure authetication

* fixing shortcodes reverted by merge conflict fix

* fixing admonition

* fixing more broken shortcodes

* adjusting some wordings ot make vale happy

* updating feature toggle info
2025-04-09 09:02:51 -05:00
8af271187c Docs: Remove references to group sync (#102599)
* remove references to group sync

* remove relfref and add new link

* remove relfref

* Update relfref

* remove relrefs and add admonitions

* fix URL

* remove relrefs

* replace relrefs

* replace relrefs

* replace relrefs

* replace relrefs

* replace relrefs

* replace relrefs

* replace relrefs

* replace relrefs

* run prettier

---------

Co-authored-by: Irene Rodríguez <irene.rodriguez@grafana.com>
2025-03-21 16:13:44 +00:00
874751d9da Docs: AzureAD + SAML improvements (#102623)
* Docs: AzureAD + SAML improvements

* Fix
2025-03-21 17:00:12 +01:00
13cf67de53 Remove relref shortcodes (#101694)
* manually replce all shared relrefs

* relref replace - grafana next

* Merge branch 'master' into robbymilo/relref-replace-grafana-next

* manual fixes

* remove ref shortcode

* Merge branch 'master' into robbymilo/relref-replace-grafana-next

* prettier

* fix test

* update readme
2025-03-06 13:59:08 +01:00
79d565f285 OAuth: Support client_secret_jwt for oauth providers when doing token exchange (#95455)
* added backend support for client_secret_jwt

* added backend support for client_secret_jwt

* added all logic to the exchange function (overloaded social exchange in azuread_oauth to handle managed identity client id)

* ran yarn install to update lock file

* added support for client_secret_jwt when managed_identity_client_id is null

* added audience flag and changed exchange to directly access oauth config using .info

* added logic in setting oauth.Config for supported client authentication values

* added client_authentication, managed_identity_client_id, and audience to sample.ini file

* using provided ctx in ManagedIdentityCallback function

* added frontend support for federated identity credential auth

* added client authentication field

* added Azure AD documentation for Grafana

* added bold font to "Add" keyword in documentation

* minor wording change relating to previous commit

* addressed changing audience to federated_credential_audience, moving validation, and changing managedIdentityCallback to private function

* correction to audience name changing

* fixed orgMappingClientAuthentication function name, and added in logic into validateFederatedCredentialAudience function

* Change docs

* Add iam team as owner of azcore pkg

* added backend support for client_secret_jwt

* added all logic to the exchange function (overloaded social exchange in azuread_oauth to handle managed identity client id)

* ran yarn install to update lock file

* added support for client_secret_jwt when managed_identity_client_id is null

* added audience flag and changed exchange to directly access oauth config using .info

* added logic in setting oauth.Config for supported client authentication values

* added client_authentication, managed_identity_client_id, and audience to sample.ini file

* using provided ctx in ManagedIdentityCallback function

* added frontend support for federated identity credential auth

* added client authentication field

* added Azure AD documentation for Grafana

* added bold font to "Add" keyword in documentation

* minor wording change relating to previous commit

* addressed changing audience to federated_credential_audience, moving validation, and changing managedIdentityCallback to private function

* correction to audience name changing

* fixed orgMappingClientAuthentication function name, and added in logic into validateFederatedCredentialAudience function

* Change docs

* Add iam team as owner of azcore pkg

* updated yarn lock file

* updated doc for correction

* removed wrong changes in pkg directory

* removed newline in dashboard-generate.yaml and unified.ts

* updated yarn.lock to match upstream

* Lint

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* removing unwanted changes

* added back removed newline

* fixed failing test in azuread_oauth_test.go

* Update azuread_oauth.go

removed unnecessary newline, fixed lint

---------

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
Co-authored-by: Mihaly Gyongyosi <mgyongyosi@users.noreply.github.com>
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
2025-01-07 10:42:52 +01:00
63d3cf93fe Docs: Clarify when force_use_graph_api is required for Azure (#97844) 2024-12-12 15:17:46 +01:00
2ffb7344e8 GAS: update auth provider docs (#96097)
* add docs describing what GAS is and how it can be configured

* auth provider docs for GAS

* PR feedback
2024-11-19 18:27:34 +00:00
9233ad6462 Docs: Update GitLab, GitHub, Okta, Generic OAuth docs (#96386)
* GitHub docs changes

* Bunch of updates

* More updates
2024-11-14 10:47:25 +01:00
092b2ef5d2 Docs: Improve Google OAuth docs (#96377)
* Add Configuration options to the bottom, align the setup with Cloud docs

* Fixes, format changes

* Update docs/sources/setup-grafana/configure-security/configure-authentication/google/index.md

Co-authored-by: xavi <114113189+volcanonoodle@users.noreply.github.com>

* fix

---------

Co-authored-by: xavi <114113189+volcanonoodle@users.noreply.github.com>
2024-11-13 11:38:43 +00:00
a2c998ba1d Docs: Azure AD/ Entra ID docs improvements (#96225)
* Add Configuration options to Azure/Entra docs

* Update docs/sources/setup-grafana/configure-security/configure-authentication/azuread/index.md

Co-authored-by: Vardan Torosyan <vardants@gmail.com>

* Address feedback

* Address other feedback

* Fix link

---------

Co-authored-by: Vardan Torosyan <vardants@gmail.com>
2024-11-12 11:04:39 +01:00
0c73403e00 Docs: initial pruning of outdated versioning info (#95212)
* initial pruning of outdated versioning info

* removing erroneous file
2024-10-24 09:42:04 -05:00
c6eeb2d845 remove unnecessary version notices (#94839) 2024-10-17 10:32:17 +01:00
9a44296bc2 Auth: Add org to role mappings support to AzureAD/Entra integration (#88861)
* Added implementation and tests

* Add docs, simplify implementation

* Remove unused func

* Update docs
2024-06-10 12:08:30 +02:00
7726631fe8 IAM docs: Update Azure AD OAuth2.0 docs after rename to Entra ID (#87925) 2024-05-16 20:36:52 +02:00
ccd2bff8b0 Docs: Create the Azure AD application section has outdated information. (#71498)
Update index.md
2024-04-29 10:24:49 +01:00
f727e21873 Docs: Fixed a typo in the Azure config page (#84475)
fixed typo, cleaned up some language
2024-03-14 11:10:35 -05:00
0b71354c8d Docs: Improve SSO Settings docs (#83914)
* Improve docs

* remove trailing slash

* Update relref
2024-03-09 19:24:48 +01:00
bc8952b9f1 Docs: Setup OAuth providers using the SSO Settings UI (#81589)
* initial changes for generic_oauth, okta

* updates

* add terraform examples for each provider

* add link to terraform registry for grafana_sso_settings resource

* remove auth_url, token_url and api_url from github, gitlab and google

* Add documentation for enabling email lookup

* Apply suggestions from code review

Co-authored-by: lwandz13 <126723338+lwandz13@users.noreply.github.com>

* Address review feedback

* Update TF provider version

* Apply suggestions from code review

Co-authored-by: lwandz13 <126723338+lwandz13@users.noreply.github.com>

* Use Azure AD for now

---------

Co-authored-by: Mihai Doarna <mihai.doarna@grafana.com>
Co-authored-by: lwandz13 <126723338+lwandz13@users.noreply.github.com>
2024-02-16 17:24:42 +01:00
9e5826f40f OAuth: Remove accessTokenExpirationCheck feature toggle (#79455)
* Remove accessTokenExpirationCheck from code and align docs

* Apply suggestions from code review

* lint

---------

Co-authored-by: lwandz13 <126723338+lwandz13@users.noreply.github.com>
2023-12-15 13:20:17 +01:00
9f93063719 Auth: Improve groups claim setup docs for AzureAD (#78791)
* Improve groups claim setup docs

* Improve the GroupMember.Read.All perm docs

* Apply suggestions from code review

* Update docs/sources/setup-grafana/configure-security/configure-authentication/azuread/index.md

* Update docs/sources/setup-grafana/configure-security/configure-authentication/azuread/index.md

* Update the groups and app roles documentation

* Update

* Split long list to separate sections

* fix anchor

* Apply suggestions from code review

* Address other comments, fix anchors

* Address other comments, lint

* Apply suggestions from code review

* Changes

* final adjustments

---------

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
Co-authored-by: lwandz13 <126723338+lwandz13@users.noreply.github.com>
2023-12-07 15:31:27 +01:00
7a5f76d547 Docs: Fix incorrect information in docs related to accessTokenExpirationCheck (#78604)
Fix docs
2023-11-27 16:40:50 +01:00
7eb17bccca Explicitly set all front matter labels in the source files (#71548)
* Set every page to have defaults of 'Enterprise' and 'Open source' labels

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Set administration pages to have of 'Cloud', 'Enterprise', and 'Open source' labels

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Set administration/enterprise-licensing pages to have 'Enterprise' labels

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Set administration/organization-management pages to have 'Enterprise' and 'Open source' labels

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Set administration/provisioning pages to have 'Enterprise' and 'Open source' labels

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Set administration/recorded-queries pages to have labels cloud,enterprise

* Set administration/roles-and-permissions/access-control pages to have labels cloud,enterprise

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Set administration/stats-and-license pages to have labels cloud,enterprise

* Set alerting pages to have labels cloud,enterprise,oss

* Set breaking-changes pages to have labels cloud,enterprise,oss

* Set dashboards pages to have labels cloud,enterprise,oss

* Set datasources pages to have labels cloud,enterprise,oss

* Set explore pages to have labels cloud,enterprise,oss

* Set fundamentals pages to have labels cloud,enterprise,oss

* Set introduction/grafana-cloud pages to have labels cloud

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Fix introduction pages products

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Set panels-visualizations pages to have labels cloud,enterprise,oss

* Set release-notes pages to have labels cloud,enterprise,oss

* Set search pages to have labels cloud,enterprise,oss

* Set setup-grafana/configure-security/audit-grafana pages to have labels cloud,enterprise

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Set setup-grafana/configure-security/configure-authentication pages to have labels cloud,enterprise,oss

* Set setup-grafana/configure-security/configure-authentication/enhanced-ldap pages to have labels cloud,enterprise

* Set setup-grafana/configure-security/configure-authentication/saml pages to have labels cloud,enterprise

* Set setup-grafana/configure-security/configure-database-encryption/encrypt-secrets-using-hashicorp-key-vault pages to have labels cloud,enterprise

* Set setup-grafana/configure-security/configure-request-security pages to have labels cloud,enterprise,oss

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Set setup-grafana/configure-security/configure-team-sync pages to have labels cloud,enterprise

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Set setup-grafana/configure-security/export-logs pages to have labels cloud,enterprise

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Set troubleshooting pages to have labels cloud,enterprise,oss

* Set whatsnew pages to have labels cloud,enterprise,oss

* Apply updated labels from review

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>

---------

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
2023-07-18 09:10:12 +01:00
dcf26564db OAuth: Introduce user_refresh_token setting and make it default for the selected providers (#71533)
* First changes

* WIP docs

* Align current tests

* Add test for UseRefreshToken

* Update docs

* Fix

* Remove unnecessary AuthCodeURL from generic_oauth

* Change GitHub to disable use_refresh_token by default
2023-07-14 14:03:01 +02:00
fc290281cb Docs: reorder auth provider pages (#70764)
* order auth provider pages

* add shorter menu titles

* linting

* update reference

* rename Grafana auth section to basic auth
2023-06-29 15:44:33 +03:00
Jo
4821175d40 Auth: Add auth.azure_ad security improvements (#912)
* security improvements id_token

* add audience validation

* add allowOrganizations

* add allowOrganizations tests and documentation

* add log warn on no configuration

* anonymize tenant id

* Apply suggestions from code review

Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>

* Update docs/sources/setup-grafana/configure-security/configure-authentication/azuread/index.md

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>

* Update pkg/login/social/azuread_oauth_test.go

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>

* Update pkg/login/social/azuread_oauth_test.go

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>

* optimize key validation and add mising fields

* fix missing key_id

* lint

* Update docs/sources/setup-grafana/configure-security/configure-authentication/azuread/index.md

Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>

* lint docs

---------

Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
2023-06-23 09:13:38 +02:00
3e48c0b570 docs: Azure doc link update (#69749)
Update index.md

Link update
2023-06-07 16:43:04 -05:00
345b7fadc9 Auth: Update docs on use PKCE by default (#68638)
* Auth: Update docs on use PKCE by default. (#68073)

Signed-off-by: junya koyama <arukiidou@yahoo.co.jp>

* Fix: docs review - from introduces to provides https://github.com/grafana/grafana/pull/68638/files#r1200506006

Signed-off-by: junya koyama <arukiidou@yahoo.co.jp>

* Fix docs - Remove note about a version https://github.com/grafana/grafana/pull/68638/files#r1200508038

Signed-off-by: junya koyama <arukiidou@yahoo.co.jp>

* Update docs/sources/setup-grafana/configure-security/configure-authentication/azuread/index.md

---------

Signed-off-by: junya koyama <arukiidou@yahoo.co.jp>
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2023-05-30 11:17:45 -05:00
560f49b3dc Enable doc-validator for specific directories (#63524)
* Enable doc-validator for specific directories

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Fix one linting error to trigger CI

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Update doc-validator to latest release

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Update make-docs procedure

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Use doc-validator version from CI in local make target

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Revert to 1.11.0

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* adds missing descriptions

* Fix titles and headings

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Fix link formats

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Fix easy to resolve anchors

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Remove broken anchor link

This anchor appears to have been broken for a long time.

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Use doc-validator image with support for numbered anchors

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Update make-docs procedure to support doc-validator 2.0.x

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Fix a bunch of broken anchors

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Ignore old whatsnew content

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Update doc-validator to v2.0.x and use reviewdog to report errors

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* removes broken links

---------

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
Co-authored-by: Chris Moyer <chris.moyer@grafana.com>
2023-05-18 15:50:20 +01:00
7019287f88 Auth: Add deprecation notice for oauth_skip_org_role_update_sync (#62712)
* add: deprecaation notice for overall setting

* add: deprecation notice for configuration files

* chore: update docs with deprecation notice

* refactor: change to note the new setting instead

* Update pkg/setting/setting.go

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>

* refactor: based on review comments

---------

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2023-02-07 15:28:40 +00:00
60ef88c918 SAML: Support auto login (#61685)
* SAML: Support auto login

* Add individual auto_login option for each OAuth provider

* Docs: Describe new auto_login option

* Minor refactor
2023-01-19 15:53:02 +01:00
c5e74ee607 Auth: Add skip_org_role_sync for AzureAD OAuth (#60322)
* [WIP] Auth: add backend skipOrgRoleSync to AzureAD OAuth

- add: skipOrgRoleSync
- rename: skipOrgRoleSync to skipOrgRoleSyncBase (to make it clear that
  it is the base version of SocialBase)
- add: tests for skipOrgRoleSync in AzureAD

TODO:
- [ ] frontend changes

* add: docs

* refactor: remove role from basicinfo

* add: settings for grafanacom

* add: settigns for frontend

* add: logic for azureAD user skip org role

* add: docs for skip_org_role_sync

* refactor: docs a bit

* add: tests for userinfo

* refactor: to only extract if skiporgrolesync false

* refactor: based on review comments

* Update docs/sources/setup-grafana/configure-grafana/_index.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Update docs/sources/setup-grafana/configure-grafana/_index.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2023-01-16 13:16:01 +01:00
c1c48dd610 Use relative aliases for all non-current Grafana aliases (#60062)
* Use relative aliases for all non-current Grafana aliases

Prevents non-latest documentation "stealing" the page away from latest
and through permanent redirects for latest pages that no longer exist.

The redirected pages are indexed by search engines but our robots.txt
forbids them crawling the non-latest page.

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Remove aliases from shared pages

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Rewrite all current latest aliases to be next

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Fix typo in latest alias

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Remove all current page aliases

find docs/sources -type f -name '*.md' -exec sed -z -i 's#\n *- /docs/grafana/next/[^\n]*\n#\n#' {} \;
find docs/sources -type f -name '*.md' -exec sed -Ez -i 's#\n((aliases:\n *-)|aliases:\n)#\n\2#' {} \;

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Prettier

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
2022-12-09 12:36:04 -04:00
4915d21c25 OAuth: Feature toggle for access token expiration check and docs (#58179)
* Add feature toggle for access token expiration check

* Add docs for configuring refresh tokens

* Update docs

* Update docs based on review

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Improve documentation

* Change access_type default to Offline

* Update docs/sources/setup-grafana/configure-security/configure-authentication/gitlab/index.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Update docs/sources/setup-grafana/configure-security/configure-authentication/google/index.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Update pkg/services/featuremgmt/registry.go

Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>

* Regenerate toggles

* Update Generic OAuth docs

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>
2022-11-14 16:47:46 +01:00
d09d39ddd4 Docs/restructures setup (#57125)
* builds out configure grafana directory to align with hugo

* restructures configure authentication, corrects relrefs

* correct alias

* corrects final relrefs
2022-10-17 15:24:33 -05:00