290 Commits

Author SHA1 Message Date
e9ed7223a6 Use authlib repo. Use otel (#103178)
* Use authlib repo. Use otel

* Use interceptors on the provider level

* Create a new wire set with otel

* Lint

* Fix test

* make update-workflow

* make update-workspace

* make update-workspace. Try to add authlib as enterprise imports

* make update-workspace
2025-04-07 15:47:40 +02:00
d82d03a1d3 SCIM: Update authinfoquery (#103123)
* Rewrite mismatched externalUID error message

* Update AuhtInfo if user exists
2025-03-31 22:42:07 +02:00
c3b039f3a2 Start using otel in storage/unified/resource (#102616)
* Start using otel storage/unified/resource

* make update-workspace

* Go mod build owners

* Make workspace-update

* Update pkg/storage/unified/resource/access.go

Co-authored-by: maicon <maiconscosta@gmail.com>

* Add introduced pkg/apis to dependabot file

* Revert "Update pkg/storage/unified/resource/access.go"

This reverts commit f50e29d0394e48d5cd5bfbab154cb83da0b2f8b2.

* Revert "Update pkg/storage/unified/resource/access.go"

This reverts commit f50e29d0394e48d5cd5bfbab154cb83da0b2f8b2.

* Use traceid only

---------

Co-authored-by: maicon <maiconscosta@gmail.com>
2025-03-31 09:58:01 -03:00
77fa2271be AppPlatform: Introduce experimental Github integration for dashboard configuration management (#96329)
* [Provisioning] Pay back some technical debt (#100720)

* Handle pagination in github client

* Add some unit test coverage

* Remove unknown repository

* Remove unknown leftover

* Revert "Add some unit test coverage"

This reverts commit 420c9674d226b65bd5ec8f1f1880517f119d7df0.

* Revert "Revert "Add some unit test coverage""

This reverts commit f7eca419573c889056f7a0ffb2c7bda7f0fa4c9e.

* Revert unit tests in github package

* Remove S3 case as it's now deprecated

* [Provisioning] Consolidate job status report in JobProgressRecorder (#100718)

* Log also successful operation

* Consolidate stop logic under TooManyErrors

* Use error for TooManyErrors

* Pass the progress recorder

* Define JobProgressRecorder interface

* Do not expect workers to return status

* Remove scenarios due to pointers

* Use recorder to manage the entire state

* Provisioning: Support rotating secrets (#100705)

* Provisioning: Refactor webhook to another interface (#100733)

* POC/Provisioning: Remove S3 references (#100734)

* Remove unused script

* Remove s3 references

* Provisioning: Keep the existing k8s name if it is specified in metadata (#100672)

* keep name

* keep name

* Revert "keep name"

This reverts commit 29f87bcaeb4c324dc9e5f5231db066900f35b21a.

* Commit stale go.mod

* Keep name also for sync deletions

---------

Co-authored-by: Roberto Jimenez Sanchez <roberto.jimenez@grafana.com>

* Update preview banner copy

* Query Library: Move backend to enterprise (#100371)

* Fix wire

* Fix jobs table re-renders

* Provisioning: Refactor history to its own interface (#100735)

* Provisioning: Refactor history to its own interface

* refactor: use VersionedRepository

* Update API

* Provisioning: Test the GitHub client directly (#100808)

* Provisioning: Test the GitHub client directly

Instead of mocking the abstracted client, test it as well by mocking the underlying GitHub client. This also lets us
remove the mock for the abstracted client.

* refactor: move out helpers

* chore: set dependency owner

* Provisioning: Better clone/push error support (#100854)

* Provisioning: Replace searcher with one that knows about modes (#100857)

* Provisioning: Start in "mode5" when nothing exists in legacy (#100862)

* [Provisioning] Fix duplicate sync jobs triggered in controller (#100870)

* Improve logging on reasons why the controller triggered

* Fix messaging for sync job

* fix lint

* Provisioning: Move legacy export/import into a single migrate job (#100865)

* [Provisioning] Miscellanenous bug fixes and improvements (#100976)

* Error if found duplicate ID

* Fix issue with manual test button

* Fix issue with health errors not going away

* Display status in sync overview

* Use patch operations instead

* Trigger sync job after status update

* Convert Export Tab into modal

* Remove unused FieldSet import

* Only last 8 jobs

* Remove Links card

* Use button for Github Source Code

* Add actions to resources page

* Add resource column to Repository Resources

* Display Job Spec in RecentJobs

* Display dates in history page

* Display Avatar if available

* Improve styling of the avatar

* Update betterer

* Remove duplicate history header in history

* Commit betterer

* Address code styling issues

* update flags

* github v69

* v69

* POC/Provisioning: Add wizard (#100596)

* Chore: make update-workspace

* Chore: Fix lints (#101039)

* Provisioning: Workflows as write access (#101031)

* workflow as write access

* workflow as write access

* workflow as write access

* Update pkg/registry/apis/provisioning/repository/test.go

Co-authored-by: Mariell Hoversholm <mariell.hoversholm@grafana.com>

* POC/Provisioning: Add wizard (#100596)

* update refs

* update refs

* lint fix

* lint fix

* lint fix

* default everythign to read only

* reuse form components

* remove main

---------

Co-authored-by: Mariell Hoversholm <mariell.hoversholm@grafana.com>
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>

* merge main

* Fix workflow types

* Betterer

* [Provisioning] Fix webhook and finalizer issues (#101052)

Fix webhook and finalizer issue

The maximum number of webhooks per repository is 20

* [Provisioning] Fix issue with last ref (#101056)

* Fix issue with last ref

* Update frontend code

* Fix the local tmp test

* Use lastRef

* POC/Provisioning: Simplify connect step (#101064)

* Fix sending workflows

* Use write for local

* Move connect action to the next step

* Remove wizard props

* Typo

* Redirect to wizard

* Show repo link after successful export

* Provisioning: Avoid starting sync jobs when using legacy storage (#101114)

* avoid starting sync jobs on legacy

* newlines

* Provisioning: Onboarding landing page (#101112)

* add landing page before wizard

* Update onboarding page

* Update URL

* Remove unused

* Add deleteAll button

* Improved text

* betterer

---------

Co-authored-by: Clarity-89 <homes89@ukr.net>

* Provisioning: use the sync job to finish the migrate job (#101107)

* Provisioning: Show progress more often (#101128)

* show progress bar earlier

* show progress bar earlier

* update wording to be less specific

* POC/Provisioning: Enable sync (#101131)

* update preview banner

* actualy remove and don't crash without provisioning flag

* Update db banner

* Provisioning: Export oldest items first (#101189)

* Provisioning: better branch handling (#101188)

* add missing file

* Provisioning: Fix tests (#101197)

* Provisioning: Refactor tests to be multiple functions

* Provisioning: Fix tests

* fix: make github-example sync

* fix misspell

* Provisioning: avoid migration wizard if things are already in unified storage (#101204)

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>

* more lint

* POC/Provisioning: Handle connect step errors (#101192)

* Provisioning: Unify status handling in repository and migrate steps

* Refactor: Move WorkflowsField outside RepositoryStep and use proper type

* Refactor: Improve repository verification error handling and UI

* Refactor: Simplify repository verification error handling

* Refactor: Simplify RepositoryStep component structure

* Refactor: Improve error handling in RepositoryStep

* Refactor: Remove redundant repository creation logic from ProvisioningWizard

* Refactor: Simplify RequestErrorAlert component

* show github error

* now will verify

* test .git

* recover from bad config

* Update error handling

* Remove unused prop

* merge upstream

* Show migration summary

* Update text

* Improve text

* Betterer

* [Provisioning] Review controller changes (#101216)

* Review health check conditions

* Move down the logic to set up the sync status

* Skip if it's only a health check rerun

* Fix health check conditions

* Preserve last ref

* Format code

* Rename to shouldSkipSync

---------

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: Roberto Jiménez Sánchez <roberto.jimenez@grafana.com>

* fix promotion step

* In the promotion pipeline, publish should depend on build

* fix promotion pipeline

* [Provisioning] Use smaller methods to process repository events (#101240)

* update codegen

* merge main

* Provisioning: Avoid localhost error loop (#101253)

* Provisioning: Update the recent jobs formatting (#101250)

format history

* [Provisioning] Refactor Pull Request & Lint worker (#101273)

* Refactor the code

* Refactor into separate files

* Consolidate linter flag in one spot

* Use global feature flags

* Commit betterer

* Remove from JSON the intermidiate flag

* Use again spec

* Clean up

* Revert changes in test

* POC/Provisioning: Remove sync confirm modal (#101281)

* [Provisioning] Remove linting from MVP (#101286)

* Remove Linting backend

* Re-generate client

* POC/Provisioning: Unify tags (#101218)

* Unify tags

* add both tags

* add tag types

* Check for the redirect only once

* Add fetch settings with delay hook

* Refetch settings

* Split hooks into separate files

* Cleanup

* Prettier

* Prettier

* Remove lint code

* Betterer

---------

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>

* Provisioning: Update token instructions (#101280)

* Provisioning: Use blob storage rather than local file system to save images (#101298)

* [Provisioning] Add more explicit setup warnings if webhook integration and image rendering are disabled (#101304)

* Setup warnings if renders or webhooks are not possible

* Improve display

* Use a single Alert

* Make design more compact

* Only display local config is missing critical feature toggles

* Improve styling of required flags

* Add file name to the custom ini itself

* Add copy button

* Add FeatureSection Component

* Commit betterer

* Use an interactive table

* Use a modal for instructions

* Use the same modal for example config

* Improve setup steps

* Improve stepper

* Copy code ctrl + c

* Make it more compact

* Select feature to enable

* Improve the height of alerts

* Separate components

* Better warnings

* Improve the page

* Improve the cards

* Improve cards even more

* Improve cards

* Improve cards

* Optional copy in code block

* Add side bar with steps

* Improve styling

* Style modal

* Clean up Code

* Remove index file

* Simplify Step Component

* Commit betterer

* Simplify components

* Use CodeEditor and Clipboard components

* Do not show scrollback on minimum size

* Fix positioning of footer

* Separate Component for Feature

* Use different styling

* Commit betterer

* Use more Grafana components in the FeatureCard

* Separate sidebar into own components

* Simplify sidebar code

* Commit betterer

* Remove connector

* Simplify styling further

* Use cards

* Improve code

* Use more grafana component in InstructionsModal

* Further simplify

* Simplify the code

* Simplify style

* Clean up

* Simplify the Wizard

* Use little icons

* Improve feature cards

* Improve cards

* Commit betterer

* Add description to feature setup

* Improve instructions for snapshot preview

* Move all files into Setup folder

* Commit betterer

* Clean up the warnings code

* Improve coding

* Move sidebar item to separate fiel

* Rename components

* Fix issues

* Use stack instead

* Improve style

* Don't show setup button if configured already

* Simplify again CSS

* Use secondary actions

* Style a bit more

* Improve wording

* Update warning

* Refer to docs in Image Renderer

* More clean up

* Revert changes in generated client

* Fix typos and imports

* Fix lint errors

* Provisioning: better error support (#101490)

* update openapi snapshot

* fix build

* Provisioning: Only show setup page when feature toggles are missing (#101502)

* form fixing

* form fixing

* always send UID

* Same onboarding page regarless of migration (#101557)

* backend building... frontend still broken

* rename sync with main

* Provisioning: Update dashboard badge (#101599)

* Rename to push / pull everything user-facing (#101577)

* Rename to push / pull all everything user-facing

* Use automatic pulling wording

* Provisioning: Migrate when using unified storage (#101572)

* migrate when not unified

* Update pkg/registry/apis/provisioning/register.go

Co-authored-by: Roberto Jiménez Sánchez <roberto.jimenez@grafana.com>

* variables

* merge main

---------

Co-authored-by: Roberto Jiménez Sánchez <roberto.jimenez@grafana.com>

* Add tabs and features tab to listing page (#101570)

* List features in onboarding page (#101558)

* merge main

* POC/Provisioning: Check if the instance is provisioned (#101601)

* Check if the instance is provisioned

* Fix lints

* Fix getting config for new dashboard

* Fixes after merge

* More fixes

* Show success message

* Fix default value

* Add test

* Fix lints

* Provisioning: Include URLs in ResourceWrapper response (#101511)

* Convert Migrate wizard into a Connection Wizard (#101575)

* Convert Migrate wizard into a Connection Wizard

* Remove duplicate empty state

* Allow users to select target in the first step

* Remove file created by merge

* Select target based on existing connections

* Default option for targets and explainatory alert

* Do not display connect button if single connection

* Display target as tag in repository card

* Add Pull Step

* Fix linting

* User decides if migrate or connect

* Improve style based based on review

* Provisioning: Return upsert resource when writing (#101574)

* [Provisioning] Getting Started Page and Tab (#101701)

* merge main

* fix go.mod

* Provisioning: Redirect to the new URL after save (#101757)

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>

* POC/Provisioning: create folder (#101619)

* Add NewProvisionedFolderForm

* Cleanup

* Add folder api

* Register API

* Do not show provisioned badge for instances

* Enable saving

* Show saved alert

* Fixes

* Fix deps

* Cleanup

* Add test

* Add test

* Updates

* Fix test

* Fix import

* [Provisioning] Display instance connection directly in home (#101720)

* Show tabs directly in home page for instance sync

* Display actions also in the home page

* Add delete button to actions

* Fix issue with files tab

* Display tabs also in instant sync

* Generate connection name for instance sync

* Fix issues when no repositories

* Set active tab

* Remove leftover

* Rename component for listing folder repository

* Fix linting issues

* Fix merge error

* Rename to HomePage

* Split folder list into separate component

* Create own component for repository card

* Improve RepositoryCard readability

* Improve RepositoryCard styling

* Make view primary button

* Fix syntax

* Fix generateName

* merge main

* Provisioning: Move folder management into its own helper (#101864)

* folder

* update folder links

* Fix test

* update

* cleanup

---------

Co-authored-by: Clarity-89 <homes89@ukr.net>

* fixed folder issue

* POC/Provisioning: Create folder from root (#101921)

* Enable creating folder at the root

* Fix test

* Add interceptor

* Provisioning: Expose stats (#101927)

* [Provisioning] Unified onboarding wizard (#101952)

* Spike the solution

* More work

* Add more situations

* Attempt to display count of dashboards and folders

* Attempt with file count

* Do not display options if not possible

* Improve styling resources

* Use another API

* Fix issue with selection

* Style a bit

* Fix more issues

* Make the sync step work

* Improve links

* Use LinkButton

* Start pull automatically

* Start migration automatically

* Fix issue with options

* Fix issues

* Fix loading error

* Improve more things

* Improve styling

* Improve messaging

* Set the autofocus

* Fix some issues

* Fix issue with disabled options

* Only resources

* Finish settings depending on configuration

* Move title to wizard

* Fix title

* Improve styling

* Badge

* Explain on hover

* Improve styling

* Disabled at the bottom

* History & identifiers

* Improve wording

* Add padding left and right disable options

* Delete repository

* Improve buttons

* Give index time to catch up

* Improve buttons

* Handle steps with only forms

* Fix issue with initial migrate or pull

* Commit betterer

* Error messages

* Use memo

* Revampt that a bit

* Attempt to simplify the state and components

* Improve the component for Migrate

* Commit betterer

* Fix issue in next button

* Clean up more

* Start for boostrap step

* Fix issue with running status

* Fix issue with loading bootstrapping

* Improve loading

* Improve more the loading

* Fix issue with loading

* Empty tree

* Handle error

* Fix issue with looping

* Remove commented out lines

* Add comment

* Remove accidental file

* Fix imports

* Improve MigrateStep and PullStep

* Use hook for step status

* JobStep component

* Refactor data fetching

* Validate with Github

* Fix issue with failed error

* Fix next on success

* Address small comments

* Separate file for WizardContent

* Fix linting

* Use step approach also for bootstrap

* Make the logic for moving between steps clearer

* Fix navigation issue

* Clean up some logic

* Use useAsync for JobStep steps

* Revert "Use useAsync for JobStep steps"

This reverts commit 242a275cc94a2f4d61eb338d7e56e7186357a3ae.

* Provisioning: use service to get counts (#101972)

counts

* must migrate when using legacy storage

* Revert "Revert "Use useAsync for JobStep steps""

This reverts commit a420d0ac364a2b97036f585c18b9f3781864f37a.

* Fix async conditions

* Organize imports

* Separate component for BootstrapOptionCard

* BootstrapOptionsList

* Remove duplicate definitions

---------

Co-authored-by: Clarity-89 <homes89@ukr.net>
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>

* Merge

* Fix utils

* POC/Provisioning: Fix folder path for dashboard (#101997)

* Provisioning: Fix folder path for dashboards

* Fix isNew

* Update test

* Fix any error

* Betterer

* [Provisioning] Improve progress recording and updates (#102035)

* do not validate on delete

* Provisioning: Implement authorizer for remaining resources (#101945)

* feat: implement authorizer for remaining resources

* fix: don't allow viewers to write files

* security: harden blob id fetching

* add integration test for admin vs viewer

* feat: only Get is a valid verb for reads in our subresources

Co-Authored-By: Ryan McKinley <ryantxu@gmail.com>

* feat: allow render for all requests

* refactor: use guards

Not changing code that goes `if a { } else if b { } else { }` as the semantic meaning of the different branches is
easier to parse.

---------

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>

* POC/Provisioning: Improve wizard setup (#102066)

* wizard actions

* workign better

* remove more memo

* show polling interval

* cleanup

* finalizers

* Update public/app/features/provisioning/Wizard/BootstrapStep.tsx

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>

* Update public/app/features/provisioning/Wizard/BootstrapStep.tsx

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>

* Update public/app/features/provisioning/Wizard/BootstrapStep.tsx

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>

* Update public/app/features/provisioning/Wizard/BootstrapStep.tsx

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>

* Update public/app/features/provisioning/Wizard/BootstrapStep.tsx

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>

* Update public/app/features/provisioning/Wizard/WizardContent.tsx

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>

* Update public/app/features/provisioning/Wizard/WizardContent.tsx

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>

* Update public/app/features/provisioning/Wizard/BootstrapStep.tsx

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>

* updates from alex

* updates from alex

* Simplify actions

* Extract props

* history supported form legacy only (for now)

* More refactor

* change order

* Fix cleanup finalizer

* show kinds

* fix lint

---------

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
Co-authored-by: Clarity-89 <homes89@ukr.net>
Co-authored-by: Roberto Jimenez Sanchez <roberto.jimenez@grafana.com>

* Fix resource condition (#102086)

* Fix job summary stats issue (#102084)

* merge main

* Repository link should point to configured branch (#102092)

* Add getRepoHref

* Fix random string generation

* Redirect to Home on repository deletion (#102096)

* Fix extra commas in pull request comment (#102108)

* Fix image rendering endpoint (#102107)

* POC/Provisioning: Support migrate... when starting with unified storage (#102097)

* use same clone

* now using upsert

* Fix lint

---------

Co-authored-by: Roberto Jimenez Sanchez <roberto.jimenez@grafana.com>

* Clean up unprovisioned resources after unified storage migration (#102126)

* Clean up unprovisioned resources after migrate

* Clean up unprovisioned resources after migrate

* Update pkg/registry/apis/provisioning/jobs/migrate/resources.go

* Reset summary between export and pull (#102101)

* Reset summary between export and pull

* Add reset results to unified storage migration

* Provisioning: always dirty (#102151)

* fix test version

* log the watch line

* POC/Provisioning: Disable repository list watch (#102169)

* Disable watch for repo list endpoint

* Add comment

* Remove another watch

* Provisioning: Avoid calling test on every update (#102161)

test less often

* Provisioning: Support prefixes in GitHub repositories (#101969)

* feat: add a Prefix property to GitHub repo spec

* feat: make nested folders work properly

* feat: use subdir for go-git export

* fix: placeholder for prefix should be grafana/

* feat: rename prefix to path

* fix: json name should be path, too

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>

* chore: regen apis

* fix: copy 'path'

---------

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>

* Merge

* Fix duplicate type

* Provisioning: Test export functionality (#101336)

* Provisioning: Test export functionality

* fix: use context.Background

* test: add more cases for local repo path resolving

* test: rework test inputs

* test: try to make github test work

* fix: clear global state

* Update api client imports

* Fix import

* Fix test

* Update codegen

* Provisioning: Make it green (#102271)

* chore: remove unused functions

* chore: update betterer results

* chore: update openapi spec

* chore: yarn generate-apis

* fix: specify default false if undefined

* Use AnnoKeyManagerIdentity

* Add manager kind

* POC/Provisioning: Update component structure (#102297)

* Update project structure

* Update imports

* Remove unused components

* Copy fixes

* Typo

* More copy fixes

* Betterer

* Update test

* merge main

* Provisioning: Replace hardcoded clients with discovery client (#101918)

* disco client

* discovery client

* merge main

* merge main

* keep factory

* keep factory

* find preffered version for delete factory

* use same folders request

* merge main

* with integration test

* POC/Provisioning: Compare spec in test rather than raw JSON (#102352)

* compare spec not json

* compare spec not json

* [Provisioning] Add in-code TODOs in API Server area (#102360)

* Add TODOs for files endpoint

* Add TODO history endpoint

* Add TODO to move files logic to resource package

* Add TODO to not use private fields directly

* Remove unnecessary checks in list connector

* Add pagination TODO in lister

* Add TODO to rename resources

* Add todo about cloning too early

* Add TODO to propose to merge sync and migrate endpoints

* Add TODOs in register

* Add more TODOs in connectors & routes

* Add TODOs about prefix

* Change it to remove

* Update pkg/registry/apis/provisioning/test.go

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>

---------

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>

* POC/Provisioning: Switch folders to use managedBy (#102362)

* Folders: Switch to managedBy

* Fix create folder

* Fix tests

* Do not allow changing folder from dashboard settings

* Update imports

* Update provisioned meta

* Do not show provisioned badge for child folders

* Fix folder title

* Update folder actions

* Update new provisioned folder form

* Remove unused code

* Fix condition

* Reset default values on change

* Remove duplicate nav item

* Add managedBy to DashboardQueryResult

* Provisioning: support watch over live (in feature branch) (#102408)

* Provisioning: watch cleanup (#102424)

* fix lint

* Provisioning: Add basic usage stats (#102405)

* [Provisioning] Add limitations to Github Repository (#102451)

* Put limits to Github

* File is too large

* Move constants

* Embed ListOptions again

* Remove TODO

* Provisioning: Pick a better default title (#102516)

better title

* Provisioning: sanitize pull request urls (#102517)

* [Provisioning] Clean up clone after export and migrate (#102467)

* Remove clone directory on clone failure

* Defer remove clones

* Log error if removal fails

---------

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>

* [Provisioning] Limit path length and depth in APIs (#102472)

* Limit filepath length in files API calls

* Add common utility to deal with paths

* Use the existing function

* Fix import

* Update pkg/registry/apis/provisioning/safepath/limit.go

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>

* Fix issue after website commit

* Fix linting issue in test

---------

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>

* Add timeout, JSON check and max body size to endpoints (#102443)

* Add timeout, JSON check and max body size to endpoints

* Use http.MaxBytesReader instead

* Use MaxBytesReader also for reading the entire body

* Add empty line

* Add unit tests

* Fix integration tests

* Update pkg/registry/apis/provisioning/render.go

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>

* Do not use utils :)

* Fix comment on unmarshalJSON

* 25MB for webhook events

* Remove content type check for files write

---------

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>

* fix imports

* Provisioning: Remove export option from the UI (#102511)

* [Provisioning] Remove unused checkout method in go-git (#102460)

* [Provisioning] Limit max number of repositories to 10 (#102542)

* Limit to maximum 10 repositories in backend

* Change messaging

* Do not display connect button if more than 10

* Only fetch settings once

* watch repos

---------

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>

* [Provisioning] Limit size and time to git clone and push in go-git (#102458)

* Limit git clone and push time and size

* Fix linting

* Use transport instead to limit

* Remove not supported

* Add TODO to make timeout configurable

* chore: make update-workspace

* Provisioning: Implement a new job queue (#102446)

* feat: implement a new job queue

Outstanding problems:

  * Status isn't saved.
  * Progress updates don't work (due to status not being saved probably?).

* feat: properly save status

* chore: document label

* chore: assumptions do hold

* fix: support multi-tenant job drivers

* fix: use namespace=*

* fix: set resource back to pointer when updating job progress

If we don't do this, we start rejecting job progress updates as the version falls out of sync.

* feat: make job APIs read-only

* fix: complete job when worker returns

* fix: set namespace on requests from controller

* test: check historic jobs

* chore: regen apis

* feat: start augmenting frontend

* feat: add jobs to authorizer

* feat: use watch from input

* fix: make frontend subscribe to historic jobs

* fix: lint

* chore: yarn prettier:write

* fix: frontend lints

* test: allow for empty state in historicjobs

* test: set content type for export request

* fix: always set job name on insert

* fix: import

* fix: use dashes not colons

* fix: job status should expect a historic job transition

* fix: allow PR jobs from multiple PRs

* feat: same name for sync and migrate jobs

* feat: generate a job name in the store

* refactor: rename to persistentStore

* feat: remove status subresources on jobs

* feat: join jobs into one card

* chore: regen openapi snapshot

---------

Co-authored-by: Roberto Jimenez Sanchez <roberto.jimenez@grafana.com>

* Provisioning: Use a complete storage for jobs (#102605)

* feat: add a complete strategy to apiserver

* feat: use the complete storage strategy for jobs

* test: behaviour changed in main

* [Provisioning] Consolidate file path handling (#102617)

* Add more cases for validation

* Call the method dir

* Clean files endpoint

* Simplify further

* Fix issues with folder

* Add Dir function

* Use walk function in folders

* Move things from ID

* Fix some tests

* Add tree

* Sync worker and changes

* Add more TODOs

* Add normal join

* Remove things in local

* Consolidate single Join

* Call it safe

* Add new IsPathSupported action

* Move the depth to resources

* Add more cases

* Improve trie implementation

* Add tests trie

* Fix trie tests

* Improve trie tests

* Add tests for walk

* Fix linting

* Add unit tests filepath

* Remove TODO

* Remove another TODO

* Unsupported file extension error

* Add documentation for IsPathSupported

* Filepath unit tests

* Use safepath to validate github path

* Remove TODO in wrapper

* Use trailing slash in folder internal object

* Fix changes test

* Include dot

* Add TODO to explore own type for path

* Fix frontend lint

* Fix unit tests

* Fix provisioning integration tests

---------

Co-authored-by: Roberto Jiménez Sánchez <roberto.jimenez@grafana.com>
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: Clarity-89 <homes89@ukr.net>
Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
Co-authored-by: Kevin Minehart <kmineh0151@gmail.com>
2025-03-25 08:59:03 +01:00
cb532cafef SCIM: Validate provisioned users (#102099)
* Validate authID when user is provisioned

* Add new `user_unique_id` to `user_auth` table

* Validate provisioned user with saml assertion

* Rework `ExternalUID`

* Validate for ExternalUID only

* Enhance verbosity

* Move ExternalUID to saml config

* Rename db variable for externalUID

* Add verbosity to debug ExternalUID

* Assign new error for ExternalUID mismatch

* Add `GetByLoginFn`

* Add new configuration to saml tests

* add validation for empty externalUID
2025-03-24 09:28:51 +01:00
aeca9a80a4 JWT: Add org role mapping support to the JWT provider (#101584)
* add org role mapping to the jwt provider

* Fix indentation for OrgMapping assignment

* add-test

* fix linting

* add org_attribute_path

* fix test

* update doc

* update doc

* Update pkg/services/authn/clients/jwt.go

* Update docs

---------

Co-authored-by: Mihaly Gyongyosi <mgyongyosi@users.noreply.github.com>
2025-03-21 14:18:53 +01:00
045733aed6 [IAM] Clear user's permission cache after login (#102311) 2025-03-19 10:06:58 +01:00
f1e4706f79 Authn: Concurrent updates to last seen at (#102122)
* Use singleflight for last seen update

* Run last seen update in a signelflight
2025-03-14 10:17:42 +01:00
94020aa9cd Config: Remove setting editors_can_admin (#101607)
* Remove editors can admin

* delete file

* add ac_test back

* Add linting ignore

* more static ignore
2025-03-12 16:25:23 +00:00
1f637d07eb unistore: check namespace (#102020)
* check namespace in unistore

* fix tests

* fix trace status

* Use capital letter

---------

Co-authored-by: Karl Persson <23356117+kalleep@users.noreply.github.com>
2025-03-12 14:37:17 +01:00
43f56c5ca1 Apiserver: Refactor authenticator and authorizers (#101449)
* Clean up authenticator

* Cleanup authorizers and replace org_id and stack_id with namespace authorizer

* Remove dependency on org service

* Extract orgID from /apis/ urls and validate stack id
2025-03-06 16:01:12 +01:00
b7a0aeeb0d SCIM: Disable auto assign organization if the user has been provisioned (#101307)
* Add isProvisioned field to model

* Add new isProvisioned column to migration

* Disable auto assignment to organization if the user is provisioned

* add annotation to user model

* add annotation to user models

* Remove IsProvisioned field from Identity

* Move new field assignenment and add default value

* Update annotations for user query results

* Remove isProvisioned from identity

* Add new column to test

* Resolve user from identity at SyncOrgHook
2025-03-03 17:51:23 +01:00
fa74d1c36d Authn: Sync authlib and update how we construct authn client interceptor (#101124)
* Sync authlib and update how we construct authn client interceptor

* Remove namespace from checker
2025-02-26 09:22:09 +01:00
14886410d6 Zanzana: Use shared auth interceptor for zanzana and pass tracer (#100968)
* Use shared auth interceptor for zanzana and pass tracer
2025-02-20 16:07:06 +01:00
16fda6f686 Authz: Setup access claims for service identity (#100986)
* Setup access claims for service identity and add them to identityes without any claims
2025-02-20 13:54:47 +01:00
a897ec3426 Authn: grpc errors (#100951)
* update authlib

* Map to grpc status
2025-02-19 11:46:48 +01:00
6eeb28e312 Authn: use authenticator for grpc (#99573)
* Remove usage of grpc-authenticator

* Cleanup client construction code
2025-02-17 10:58:59 +01:00
0b4c622df8 AuthN: Refetch user on "ErrUserAlreadyExists" (#100346)
* AuthN: Refetch user on "ErrUserAlreadyExists"
2025-02-13 11:27:57 +01:00
6200361f36 Auth: Add IP address login attempt validation (#98123)
* Auth: Add IP address login attempt validation

* LoginAttempt struct IpAddress field must be camelCase to match db ip_address column

* add setting DisableIPAddressLoginProtection

* lint

* add DisableIPAddressLoginProtection setting to tests

* add request object to authenticate password test

* nit suggestions & rename tests

* add login attempt on failed password authentication

* dont need to reset login attempts if successful

* don't change error message

* revert go.work.sum

* Update pkg/services/authn/clients/password.go

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

---------

Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
2025-02-05 20:16:36 +02:00
b16e290444 Auth: Remove feature toggle authAPIAccessTokenAuth (#100055)
Remove feature toggle
2025-02-04 16:31:24 +01:00
d5d8abcd64 Authn: Use authenticator for inproc (#99550)
Use generic authenticator for inproc
2025-01-27 14:28:46 +01:00
437b7a565d Auth: Add access token to in-proc communication and ServiceIdentity (#98926)
Use fake access token for in-proc grpc and add ServiceIdentity 
---------

Co-authored-by: gamab <gabriel.mabille@grafana.com>
Co-authored-by: Karl Persson <23356117+kalleep@users.noreply.github.com>
2025-01-24 14:03:23 +01:00
723fa7ddf9 MT AuthZ: Resolve renderer permissions in MT authZ service (#99362)
* resolve renderer permissions in MT authZ service

* also include DS read perms

* fix tests and linting
2025-01-23 10:21:43 +00:00
680e6bc1f8 Authlib: Use types package rather than claims (#99243) 2025-01-21 12:06:55 +03:00
b6fc695598 ExtJwtClient: Use user namespace for k8s allowed namespace (#93687)
* ExtJwtClient: Use user namespace for k8s allowed namespace

* fix test
2025-01-15 17:38:46 +01:00
345757c3ae Auth: Fix SAML user IsExternallySynced not being set correctly (#98487) 2025-01-10 17:37:37 +01:00
4581a82ac4 Auth: disable passwordless auth if any SAML/OAuth is enabled (#98227)
* Auth: disable passwordless auth if any SAML/OAuth is enabled

* Update pkg/services/authn/authnimpl/registration.go

Co-authored-by: Victor Cinaglia <victor@grafana.com>

* simplify check if any auth providers are enabled

* add accidentally removed break statement, use IsEnabled with empty context to check if PasswordlessMagicLinkAuth enabled

* use IsClientEnabled

* Update pkg/api/frontendsettings.go

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

---------

Co-authored-by: Victor Cinaglia <victor@grafana.com>
Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
2025-01-09 11:44:16 -05:00
3fe2227c82 [auth] make id-token optional (#97831)
make idtoken optional

enure there is always an identity in the context

fix: update token

fix: now it should work

fix: now it should work
2024-12-17 13:28:00 +02:00
6cd3a5458e Auth: Return error when retries have been exhausted for OAuth token refresh (#98034)
Return error when retries for DB lock have been exhausted in oauth_token.go
2024-12-16 17:03:39 +01:00
Jo
40d3b02648 Auth: Separate anonymous settings to its own struct (#97791)
separate anonymous settings to its own struct
2024-12-13 10:46:27 +01:00
3a17d0c927 IAM: align AuthInfo interface (#97228)
* Update to use updated interface
2024-12-03 15:11:17 +01:00
f6124344ba authnz: Fix panic in the authenticator and rename metric (#97150)
* Fix: panic

* suggestion
2024-11-28 14:03:54 +02:00
84b8296ffb OAuth: Use the attached external session data in OAuthToken and OAuthTokenSync (#96655)
* wip

* wip + tests

* wip

* wip opt2

* Use authn.Identity struct's SessionToken

* Merge fixes

* Handle disabling the feature flag correctly

* Fix test

* Cleanup

* Remove HasOAuthEntry from the OAuthTokenService interface

* Remove unused function
2024-11-27 11:06:39 +01:00
6e2d3cae5e AuthN: Register flags for grpc_server_authentication configuration (#97063)
* AuthZServer: Add authenticator

* Add flags
2024-11-27 10:35:35 +01:00
76f052e8de Requester: Remove duplicated function (#97038)
* Remove duplicated function

* Remove GetDisplayName from interface

* Use GetName
2024-11-26 15:29:31 +01:00
3990637af9 IAM: remove duplicated functions (#96989)
* Remove duplicated function and use the one provided by claims package
2024-11-26 09:22:45 +01:00
1061e4712f OAuth: Refactor OAuthToken service to make it easier to use the new external sessions (#96667)
* Refactor OAuthToken service

* introduce user.SessionAwareIdentityRequester

* replace login.UserAuth parameters with user.SessionAwareIdentityRequester

* Add nosec G101 to fake ID tokens

* Opt 2, min changes

* Revert a change to the current version
2024-11-21 15:36:28 +02:00
ca2c874161 authn: grpcutils: Mark ID Tokens optional in cloud mode in gRPC Authenticator (#96824)
This patch marks ID tokens as not required when initalising a gRPC
Authenticator to be used in `cloud` mode. ID Tokens are still enabled in
`cloud` mode, but the `Required` option is set to `false`.

This is needed for MT services like Cloud API Server to authenticate
against gRPC services like Resource Store with only an Access Token.

Signed-off-by: Prem Kumar <prem.saraswat@grafana.com>
2024-11-21 18:41:49 +05:30
8bb59c64f0 unistore: handle auth when fallback is used (#96772)
* handle auth when fallback is used

* handle auth when fallback is used

* add traces
2024-11-21 12:21:22 +02:00
6abe99efd6 Auth: Passwordless Login Option Using Magic Links (#95436)
* initial passwordless client

* passwordless login page

* Working basic e2e flow

* Add todo comments

* Improve the passwordless login flow

* improved passwordless login, backend for passwordless signup

* add expiration to emails

* update email templates & render username & name fields on signup

* improve email templates

* change login page text while awaiting passwordless code

* fix merge conflicts

* use claims.TypeUser

* add initial passwordless tests

* better error messages

* simplified error name

* remove completed TODOs

* linting & minor test improvements & rename passwordless routes

* more linting fixes

* move code generation to its own func, use locationService to get query params

* fix ampersand in email templates & use passwordless api routes in LoginCtrl

* txt emails more closely match html email copy

* move passwordless auth behind experimental feature toggle

* fix PasswordlessLogin property failing typecheck

* make update-workspace

* user correct placeholder

* Update emails/templates/passwordless_verify_existing_user.txt

Co-authored-by: Dan Cech <dcech@grafana.com>

* Update emails/templates/passwordless_verify_existing_user.mjml

Co-authored-by: Dan Cech <dcech@grafana.com>

* Update emails/templates/passwordless_verify_new_user.txt

Co-authored-by: Dan Cech <dcech@grafana.com>

* Update emails/templates/passwordless_verify_new_user.txt

Co-authored-by: Dan Cech <dcech@grafana.com>

* Update emails/templates/passwordless_verify_new_user.mjml

Co-authored-by: Dan Cech <dcech@grafana.com>

* use &amp; in email templates

* Update emails/templates/passwordless_verify_existing_user.txt

Co-authored-by: Dan Cech <dcech@grafana.com>

* remove IP address validation

* struct for passwordless settings

* revert go.work.sum changes

* mock locationService.getSearch in failing test

---------

Co-authored-by: Mihaly Gyongyosi <mgyongyosi@users.noreply.github.com>
Co-authored-by: Dan Cech <dcech@grafana.com>
2024-11-14 08:50:55 -05:00
8d74296b6c Authn: Always set namespace (#96230)
* Rename from AllowedKubernetesNamespace to Namespace

* Use a sync hook to always set namespace for Identity.

* format

* Don't set uid when authenticating as user
2024-11-12 10:12:47 +01:00
df8b6e6862 Fix: Close grpc_authenticator fallback trace (#96009)
Fix: Close grpc_authenticator trace
2024-11-07 11:29:25 +01:00
5a0ef46280 Add tracing to the gRPC Authentication flow (#94466)
commit ad4df4b3f63bdf3e16423ac8c3fdb1a7fae5582e
Author: gamab <gabriel.mabille@grafana.com>
Date:   Thu Oct 24 10:24:04 2024 +0200

    nit

commit eb8b9cf2f3e27cae258b3ae310f1584da5ba36b5
Author: gamab <gabriel.mabille@grafana.com>
Date:   Thu Oct 24 10:23:25 2024 +0200

    miss

commit aab1aed204a5dedcc6dd187b2f636995bbe2c5c6
Merge: 5aafdec9233 7fe710b141e
Author: gamab <gabriel.mabille@grafana.com>
Date:   Thu Oct 24 10:22:05 2024 +0200

    Merge remote-tracking branch 'origin/main' into gamab/resourcestore/tracing

commit 5aafdec9233d6824cba977b069d71eabc3d21a8d
Author: gamab <gabriel.mabille@grafana.com>
Date:   Wed Oct 16 18:03:56 2024 +0200

    Did not fix the issue

commit 20522a7f64222fad27268ac640d4b4fb9259c748
Author: gamab <gabriel.mabille@grafana.com>
Date:   Wed Oct 16 17:42:35 2024 +0200

    Test

commit b45199a341b6a57e93927c9eb7de8d7758ed7619
Merge: c0fbbdb95d4 e9e2b11ba20
Author: gamab <gabriel.mabille@grafana.com>
Date:   Wed Oct 16 17:31:59 2024 +0200

    Merge remote-tracking branch 'origin/drclau/unistor/replace-authenticators-3' into gamab/resourcestore/tracing

commit e9e2b11ba201db85a2790896730cfc60a571d747
Author: Claudiu Dragalina-Paraipan <claudiu.dragalina@grafana.com>
Date:   Wed Oct 16 18:28:31 2024 +0300

    PR feedback: simplified fallback implementation

    Co-Authored-By: Gabriel MABILLE <gamab@users.noreply.github.com>

commit b5209dba643343538924d1603958c24b8887a3db
Author: Claudiu Dragalina-Paraipan <drclau@users.noreply.github.com>
Date:   Wed Oct 16 18:03:06 2024 +0300

    Update pkg/services/authn/grpcutils/grpc_authenticator.go

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

commit c0fbbdb95d4605f349b902ca8698e7b560433867
Author: gamab <gabriel.mabille@grafana.com>
Date:   Wed Oct 16 10:32:52 2024 +0200

    Add traces to fallback

commit 75aa8dcbd49288f1dca53cdf6e9a7b41688dff38
Merge: d92fafcaf0d 562d499e850
Author: gamab <gabriel.mabille@grafana.com>
Date:   Wed Oct 16 10:29:41 2024 +0200

    Merge remote-tracking branch 'origin/drclau/unistor/replace-authenticators-3' into gamab/resourcestore/tracing

commit 562d499e8509a6e7501aa4887b200ba0359b99a7
Author: Claudiu Dragalina-Paraipan <claudiu.dragalina@grafana.com>
Date:   Wed Oct 16 11:05:01 2024 +0300

    switched to features.IsEnabledGlobally()

commit addc6aaca4a657bc5b15ff1ee36afbbdd0b17818
Author: Claudiu Dragalina-Paraipan <claudiu.dragalina@grafana.com>
Date:   Wed Oct 16 10:21:31 2024 +0300

    imports cleanup

commit 7c6d80f6aa8afb21920a3a8a0b7552a6d0658f84
Merge: 64a5e55d616 9dc2ccdbfdd
Author: Claudiu Dragalina-Paraipan <claudiu.dragalina@grafana.com>
Date:   Wed Oct 16 10:18:54 2024 +0300

    Merge branch 'main' into drclau/unistor/replace-authenticators-3

commit 64a5e55d61691f194d9c3796ac47940b3aec39c2
Author: Claudiu Dragalina-Paraipan <claudiu.dragalina@grafana.com>
Date:   Tue Oct 15 11:01:54 2024 +0300

    cleanup

commit 4fe2c0345762d84b2706c4db23ec66a8fbdc4f2b
Author: Claudiu Dragalina-Paraipan <claudiu.dragalina@grafana.com>
Date:   Tue Oct 15 10:31:06 2024 +0300

    always enable FlagAppPlatformGrpcClientAuth for k8s int tests

commit c7e36759cd6c73c93ec9d990d54081c140d9c49f
Author: Claudiu Dragalina-Paraipan <claudiu.dragalina@grafana.com>
Date:   Tue Oct 15 10:30:43 2024 +0300

    use sync.Once as it's more idiomatic

commit f5c2c7998192221103dbab0f26456b1ef7caf2fe
Author: Claudiu Dragalina-Paraipan <claudiu.dragalina@grafana.com>
Date:   Mon Oct 14 20:43:48 2024 +0300

    remove client side namespace extractor

commit 742295c89a21c8062c45049988f61f457d9c5a55
Author: Claudiu Dragalina-Paraipan <claudiu.dragalina@grafana.com>
Date:   Mon Oct 14 20:04:11 2024 +0300

    avoid double registration of metrics (fallbackCounter)

commit a45998c8d315166522353b67c1f14dfa80c06e75
Author: Claudiu Dragalina-Paraipan <claudiu.dragalina@grafana.com>
Date:   Mon Oct 14 19:03:41 2024 +0300

    use FlagAppPlatformGrpcClientAuth to enable new behavior, instead of legacy

commit ffdc301718c1187f52139275f9ba641031b8a698
Author: Claudiu Dragalina-Paraipan <claudiu.dragalina@grafana.com>
Date:   Mon Oct 14 18:37:22 2024 +0300

    remove the NamespaceAuthorizer

    The NamespaceAuthorizer would fail in legacy mode. It will be added back in the future.

commit 4a03ed7d7d60a7527d071e06127c4192dfce08e0
Author: Claudiu Dragalina-Paraipan <claudiu.dragalina@grafana.com>
Date:   Mon Oct 14 15:59:08 2024 +0300

    allow using the legacy resource client via

commit a2c30f5328dc2f96b8cb1a5103ea97535837b006
Merge: ead390f6084 2f3c539d9b5
Author: Claudiu Dragalina-Paraipan <claudiu.dragalina@grafana.com>
Date:   Mon Oct 14 14:08:32 2024 +0300

    Merge branch 'main' into drclau/unistor/replace-authenticators-3

commit ead390f60840ad281f9634558367ff707e86c84d
Author: Claudiu Dragalina-Paraipan <claudiu.dragalina@grafana.com>
Date:   Fri Oct 11 09:38:49 2024 +0300

    added server side gRPC authn fallback-to-legacy mechanism

    - brought back the old gRPC authenticator
    - added `grpc_server_authentication.legacy_fallback` config option
    - introduced `AuthenticatorWithFallback`
    - added telemetry to track fallbacks

commit d92fafcaf0db9c8d97a5d071759fc21ede7d8848
Author: gamab <gabriel.mabille@grafana.com>
Date:   Wed Oct 9 14:58:25 2024 +0200

    Fix test

commit 54f05ff0fecf3d696a0e98621db6991282503917
Author: gamab <gabriel.mabille@grafana.com>
Date:   Wed Oct 9 14:42:18 2024 +0200

    Forgot the tracer 😁

commit 3948048880c7a0eb2360a35b0cc9f3686f2edfef
Author: gamab <gabriel.mabille@grafana.com>
Date:   Wed Oct 9 14:02:41 2024 +0200

    Add traces to NamespaceAuthorizer

commit cc695bb77c37a097174556303721fbc48b9464a0
Author: gamab <gabriel.mabille@grafana.com>
Date:   Wed Oct 9 13:56:48 2024 +0200

    Add traces to authentication flow

commit 8686c46be52dc15b8ff8bf04cbaa7108d14fb1d9
Merge: 08c3d237dc2 4a3ce661930
Author: gamab <gabriel.mabille@grafana.com>
Date:   Wed Oct 9 13:56:26 2024 +0200

    Merge remote-tracking branch 'origin/main' into drclau/unistor/replace-authenticators-3

commit 08c3d237dc238bdb1da57ac200049946966a0cd1
Merge: 33fd104cfda 84d580179d9
Author: gamab <gabriel.mabille@grafana.com>
Date:   Wed Oct 9 12:41:57 2024 +0200

    Merge remote-tracking branch 'origin/main' into drclau/unistor/replace-authenticators-3

commit 33fd104cfda5e74f1ef086ed30c57530df5bd82f
Merge: 68af25fbc38 38f57d270a9
Author: gamab <gabriel.mabille@grafana.com>
Date:   Wed Oct 9 12:13:25 2024 +0200

    Merge remote-tracking branch 'origin/main' into drclau/unistor/replace-authenticators-3

commit 68af25fbc3835cb6ffe35bfdbc2e4387bed92744
Author: Gabriel MABILLE <gamab@users.noreply.github.com>
Date:   Mon Oct 7 16:31:09 2024 +0200

    Update pkg/services/authz/config.go

commit 4fba5c9b32815ff672126d3bc10ee9acf996d761
Author: gamab <gabriel.mabille@grafana.com>
Date:   Fri Oct 4 15:17:41 2024 +0200

    PR Feedback

commit 86867a14cae1a58890040bdfc60b2e042d8d0658
Author: Gabriel MABILLE <gamab@users.noreply.github.com>
Date:   Fri Oct 4 15:13:06 2024 +0200

    Update pkg/services/authn/grpcutils/config.go

    Co-authored-by: Dan Cech <dcech@grafana.com>

commit c591631135c296614d24ac668eadce948183867a
Merge: c80c46ca6a9 e37b43117b2
Author: gamab <gabriel.mabille@grafana.com>
Date:   Fri Oct 4 13:07:48 2024 +0200

    Merge remote-tracking branch 'origin/main' into drclau/unistor/replace-authenticators-3

commit c80c46ca6a9637c99b592a8b17acd3ead02892e7
Merge: 3acada9d470 4224d059341
Author: gamab <gabriel.mabille@grafana.com>
Date:   Thu Oct 3 14:58:51 2024 +0200

    Merge remote-tracking branch 'origin/main' into drclau/unistor/replace-authenticators-3

commit 3acada9d47036023d5baf01884bef3c581b86775
Author: Claudiu Dragalina-Paraipan <claudiu.dragalina@grafana.com>
Date:   Fri Sep 27 17:39:59 2024 +0300

    introducing `mode` config for gRPC auth server & client side

commit 914ca237e226a8edfd7c509bfbaedf7e2e48c28b
Author: Claudiu Dragalina-Paraipan <claudiu.dragalina@grafana.com>
Date:   Thu Sep 26 20:47:57 2024 +0300

    Fixed integration tests

commit 71c33dcbe3620e174afc9f7bd7ff1bad51dedf79
Merge: 52f248eebb3 920d79680dc
Author: Claudiu Dragalina-Paraipan <claudiu.dragalina@grafana.com>
Date:   Thu Sep 26 19:25:33 2024 +0300

    Merge branch 'main' into drclau/unistor/replace-authenticators-3

commit 52f248eebb3e7ef294d17b7399db8381cf89d4f3
Author: Claudiu Dragalina-Paraipan <claudiu.dragalina@grafana.com>
Date:   Tue Sep 24 18:44:38 2024 +0300

    updated namespace extractor usage

commit a6c977ba4d9376fb8b0ce09d4243a9298e221189
Merge: fb7bbf743b2 8da1d78c92f
Author: Claudiu Dragalina-Paraipan <claudiu.dragalina@grafana.com>
Date:   Tue Sep 24 17:35:03 2024 +0300

    Merge branch 'main' into drclau/unistor/replace-authenticators-3

commit fb7bbf743b2953987c3b0ffe07c0731126bd8d86
Author: Claudiu Dragalina-Paraipan <claudiu.dragalina@grafana.com>
Date:   Tue Sep 24 17:34:36 2024 +0300

    unistor client side updates

commit a28440c40bda3ab37ee217c4815452be6efd3db6
Merge: 79d9969aa8b a8b07b0c81d
Author: Claudiu Dragalina-Paraipan <claudiu.dragalina@grafana.com>
Date:   Tue Sep 24 10:45:09 2024 +0300

    Merge branch 'main' into drclau/unistor/replace-authenticators-3

commit 79d9969aa8b3d19f3f601e7cb369fd3fd4cd5a4e
Author: gamab <gabriel.mabille@grafana.com>
Date:   Mon Sep 9 16:14:02 2024 +0200

    Rename NewResourceClient funcs

commit 36b3752490d7e4f9b4ce727b61c12eb6310e6cb1
Merge: 8ce354bb06d b89f3f81154
Author: gamab <gabriel.mabille@grafana.com>
Date:   Mon Sep 9 16:00:54 2024 +0200

    Merge remote-tracking branch 'origin/main' into drclau/unistor/replace-authenticators-3

commit 8ce354bb06df4a3c7b9272da824b9cb3397ed68e
Author: gamab <gabriel.mabille@grafana.com>
Date:   Mon Sep 9 10:40:06 2024 +0200

    Align

commit bdf79f3b2fd6788f27bf8c81b0742d4c94b8f2b5
Merge: 8f4df8973d8 8eb7e55f8f3
Author: gamab <gabriel.mabille@grafana.com>
Date:   Mon Sep 9 10:38:45 2024 +0200

    Merge remote-tracking branch 'origin/main' into drclau/unistor/replace-authenticators-3

commit 8f4df8973d8e99c369ebd5816dde5929e15305fd
Merge: 2441cd8d53f 9338e40dc3c
Author: gamab <gabriel.mabille@grafana.com>
Date:   Thu Sep 5 11:26:39 2024 +0200

    Merge remote-tracking branch 'origin/main' into drclau/unistor/replace-authenticators-3

commit 2441cd8d53f3d5f01198a59a158c97355da45e5d
Merge: 2904074a2f7 2bbce8a7f79
Author: Claudiu Dragalina-Paraipan <claudiu.dragalina@grafana.com>
Date:   Tue Sep 3 17:31:36 2024 +0300

    Merge branch 'main' into drclau/unistor/replace-authenticators-3

commit 2904074a2f7ebf18c067e92f7205d5a8fa204f2c
Author: Claudiu Dragalina-Paraipan <claudiu.dragalina@grafana.com>
Date:   Tue Sep 3 16:35:25 2024 +0300

    refactoring

    Co-Authored-By: Gabriel MABILLE <gamab@users.noreply.github.com>

commit 125cb3c83427277d8a208dc329f22374f0865487
Author: Claudiu Dragalina-Paraipan <claudiu.dragalina@grafana.com>
Date:   Tue Sep 3 16:34:18 2024 +0300

    refactoring (aesthetics)

    Co-Authored-By: Gabriel MABILLE <gamab@users.noreply.github.com>

commit 499a31df530276f7f5bdf10d3547b6d6f077af0b
Author: Claudiu Dragalina-Paraipan <claudiu.dragalina@grafana.com>
Date:   Tue Sep 3 15:59:09 2024 +0300

    update usage of ReadGprcServerConfig()

commit f5d383644d5e4a7808db73819ca976e2976698eb
Author: Claudiu Dragalina-Paraipan <claudiu.dragalina@grafana.com>
Date:   Tue Sep 3 15:44:09 2024 +0300

    make update-workspace

commit 755485751e56677f26964a1075a405327985e780
Author: gamab <gabriel.mabille@grafana.com>
Date:   Tue Sep 3 14:43:22 2024 +0200

    Fix trace

commit d09e14c26acd7f2801a00b3e08b92a066eb5afba
Author: Claudiu Dragalina-Paraipan <claudiu.dragalina@grafana.com>
Date:   Tue Sep 3 15:42:50 2024 +0300

    removed WithIDTokenExtractorOption, and other PR feedback

commit 21220c2cca42c940d2ac246fab8126abef7b1662
Author: gamab <gabriel.mabille@grafana.com>
Date:   Tue Sep 3 14:36:59 2024 +0200

    Else statement

commit 6cf1efdcc485fd199971cbb8ecc8ed16fd372059
Author: gamab <gabriel.mabille@grafana.com>
Date:   Tue Sep 3 14:35:02 2024 +0200

    Mod update

commit 4b73a938832e29fa1dda4bdc9da75cb8e4c8c4ed
Author: gamab <gabriel.mabille@grafana.com>
Date:   Tue Sep 3 14:32:20 2024 +0200

    Add Auth func overrides

commit 6032ab3ae19931edb8b340df231f4fc652a6cd9c
Author: gamab <gabriel.mabille@grafana.com>
Date:   Tue Sep 3 14:26:18 2024 +0200

    Use NamespaceAuthorizer

commit 601beb5327ceee302c04cb75eb3d4b9ffb995097
Author: gamab <gabriel.mabille@grafana.com>
Date:   Tue Sep 3 14:20:47 2024 +0200

    Update authlib

commit a1b6408127599a6f3be0ab729c8fc0bc40f71beb
Merge: 0d70225c1ad 1128c417d82
Author: gamab <gabriel.mabille@grafana.com>
Date:   Tue Sep 3 14:18:49 2024 +0200

    Merge remote-tracking branch 'origin/main' into drclau/unistor/replace-authenticators-3

commit 0d70225c1ad24244bb23f9e08a0b2dadf386698e
Author: Claudiu Dragalina-Paraipan <drclau@users.noreply.github.com>
Date:   Tue Sep 3 15:15:54 2024 +0300

    Update pkg/services/authn/grpcutils/grpc_authenticator.go

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

commit 62f165f6f98c9798c5f8cd0e876454b4aa3c24f6
Author: Claudiu Dragalina-Paraipan <claudiu.dragalina@grafana.com>
Date:   Tue Sep 3 10:55:45 2024 +0300

    refactoring NamespaceAccessChecker usage and use CloudNamespaceFormatter in Cloud

    Co-Authored-By: Gabriel MABILLE <gamab@users.noreply.github.com>

commit bb5ee88d4faf904edc1dcdbb57a290b81966897c
Author: Claudiu Dragalina-Paraipan <claudiu.dragalina@grafana.com>
Date:   Tue Sep 3 10:39:11 2024 +0300

    added stackIdExtractor for cloud mode

    Co-Authored-By: Gabriel MABILLE <gamab@users.noreply.github.com>

commit 84866a8a516c194a06ede376148bd07c2f998003
Author: Claudiu Dragalina-Paraipan <claudiu.dragalina@grafana.com>
Date:   Tue Sep 3 10:38:19 2024 +0300

    authz client cfg changes

    - removed ModeCloud, relying on ModeGrpc and stackID instead to discover if we're running in Cloud
    - reusing settings from "grpc_client_authentication", instead of duplicating in "authorization" section

    Co-Authored-By: Gabriel MABILLE <gamab@users.noreply.github.com>

commit 14a1021605543c6d77977765d33853c9815b7735
Author: Claudiu Dragalina-Paraipan <claudiu.dragalina@grafana.com>
Date:   Mon Sep 2 21:44:35 2024 +0300

    make update-workspace

commit 84f8c9be94ac477e90895b354dc480777027854d
Author: Claudiu Dragalina-Paraipan <claudiu.dragalina@grafana.com>
Date:   Mon Sep 2 21:36:10 2024 +0300

    cleanup: refactoring leftover

commit 7fe8d623042b7c49a177fd2f84c091d719ef1fec
Author: Claudiu Dragalina-Paraipan <claudiu.dragalina@grafana.com>
Date:   Mon Sep 2 19:30:51 2024 +0300

    update authlib version (small fix)

commit 7c2353ae25d7be37482f344c3fb2275be6b79e38
Author: Claudiu Dragalina-Paraipan <claudiu.dragalina@grafana.com>
Date:   Mon Sep 2 19:17:11 2024 +0300

    cleanup: remove unused `GrpcServerConfig.Mode`

commit 52b7cf85501330cc201be6c0e900c29ed2babcc0
Author: Claudiu Dragalina-Paraipan <claudiu.dragalina@grafana.com>
Date:   Mon Sep 2 19:06:59 2024 +0300

    make update-workspace

commit 14ddfbd8fb1e742bd783307eb46a9a12e9d08bc8
Author: Claudiu Dragalina-Paraipan <claudiu.dragalina@grafana.com>
Date:   Mon Sep 2 19:02:40 2024 +0300

    finalize authlib grpc interceptors usage

commit 884c4a8c2449258f4cc1b39116c9d519e2f7f05d
Merge: 0fd1988bed3 a1190b165b5
Author: Claudiu Dragalina-Paraipan <claudiu.dragalina@grafana.com>
Date:   Mon Sep 2 19:00:07 2024 +0300

    Merge branch 'main' into drclau/unistor/replace-authenticators-3

commit 0fd1988bed31af32aad456e78f52221adb112c72
Merge: b766bfb24fe e0950a1283e
Author: Claudiu Dragalina-Paraipan <claudiu.dragalina@grafana.com>
Date:   Fri Aug 30 10:45:51 2024 +0300

    Merge branch 'main' into drclau/unistor/replace-authenticators-3

commit b766bfb24feb2ade7ef269526d3a984ba9de9e47
Merge: 6993f108a21 68751ed3107
Author: Claudiu Dragalina-Paraipan <claudiu.dragalina@grafana.com>
Date:   Wed Aug 28 15:46:04 2024 +0300

    Merge branch 'main' into drclau/unistor/replace-authenticators-3

commit 6993f108a214febc7c48c4e383107ee841e5741c
Merge: 5f073b04d0c f1ba609b348
Author: Claudiu Dragalina-Paraipan <claudiu.dragalina@grafana.com>
Date:   Tue Aug 27 12:51:07 2024 +0300

    Merge branch 'main' into drclau/unistor/replace-authenticators-3

commit 5f073b04d0c3c2b70aecd6a5f90608b850c6cf0a
Merge: 0620891d450 ac5ebe6e4d1
Author: Claudiu Dragalina-Paraipan <claudiu.dragalina@grafana.com>
Date:   Mon Aug 19 21:09:44 2024 +0300

    Merge branch 'main' into drclau/unistor/replace-authenticators-3

commit 0620891d4508b7b3ebea066e26bd4616842d8e86
Merge: 6a272e8e2a2 15f2b08f00f
Author: Claudiu Dragalina-Paraipan <claudiu.dragalina@grafana.com>
Date:   Mon Aug 12 14:14:44 2024 +0300

    Merge branch 'main' into drclau/unistor/replace-authenticators-3

commit 6a272e8e2a24200b0b93339c2ab7d0143918e0d0
Author: Claudiu Dragalina-Paraipan <claudiu.dragalina@grafana.com>
Date:   Thu Aug 8 18:53:43 2024 +0300

    allow insecure conns in dev mode + refactoring

commit 31c7b030badc0f78ec053e601a6889340040168f
Author: Claudiu Dragalina-Paraipan <claudiu.dragalina@grafana.com>
Date:   Thu Aug 8 10:31:13 2024 +0300

    allow insecure connections (for testing purposes); remove audience checks

    audience checks will still need to be done for Access tokens, but not for ID tokens

commit 0fdd2ff802ce83edeeeb0df3976ec15f1a673c98
Merge: 763961210cd f384759ad10
Author: Claudiu Dragalina-Paraipan <claudiu.dragalina@grafana.com>
Date:   Wed Aug 7 14:42:39 2024 +0300

    Merge branch 'main' into drclau/unistor/replace-authenticators-3

commit 763961210cd803e52e46dbb6e921bd396810e8dc
Author: Claudiu Dragalina-Paraipan <claudiu.dragalina@grafana.com>
Date:   Fri Aug 2 18:54:29 2024 +0300

    wip

commit c46b42a59528f3690331175eceb61ffa16b19ca7
Merge: 92aba937a96 0145b0fe704
Author: Claudiu Dragalina-Paraipan <claudiu.dragalina@grafana.com>
Date:   Fri Aug 2 14:44:06 2024 +0300

    Merge branch 'main' into drclau/unistor/replace-authenticators-3

commit 92aba937a963b8d2122fc7612c2003e7527b115e
Author: Claudiu Dragalina-Paraipan <claudiu.dragalina@grafana.com>
Date:   Thu Aug 1 18:32:19 2024 +0300

    authn: client side updates

    Co-Authored-By: Gabriel MABILLE <gamab@users.noreply.github.com>
2024-10-28 14:35:30 +02:00
830600dab0 AuthN: Optionally use tokens for unified storage client authentication (#91665)
* extracted in-proc mode to #93124

* allow insecure conns in dev mode + refactoring

* removed ModeCloud, relying on ModeGrpc and stackID instead to discover if we're running in Cloud

* remove the NamespaceAuthorizer would fail in legacy mode. It will be added back in the future.

* use FlagAppPlatformGrpcClientAuth to enable new behavior, instead of legacy

* extracted authz package changes in #95120

* extracted server side changes in #95086

---------

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
Co-authored-by: gamab <gabriel.mabille@grafana.com>
Co-authored-by: Dan Cech <dcech@grafana.com>
2024-10-24 09:12:37 +02:00
b68b69c2b4 AuthN: Use tokens for unified storage server authentication (#95086)
* Extract server code

---------

Co-authored-by: Claudiu Dragalina-Paraipan <drclau@users.noreply.github.com>
2024-10-23 15:04:15 +02:00
50a635bc7e Auth: Introduce authn.SSOClientConfig to get client config from SSOSettings service (#94618)
* wip

* possible solution

* Separate interface for SSO settings clients

* Rename interface

* Fix tests

* Rename

* Change GetClientConfig to comma ok idiom
2024-10-16 16:27:44 +02:00
21d26de4d8 Session Refactor: Add SAMLSession (#94490)
* add saml session struct

* resolve saml session

* Add NameID

---------

Co-authored-by: Mihaly Gyongyosi <mgyongyosi@users.noreply.github.com>
2024-10-10 16:57:34 +02:00
c872cad879 OrgSync: Do not set default Organization for a user to a non-existent Organization (#94537)
Do not set default org for a user to a missing org

Co-authored-by: Karl Persson <kalle.persson@grafana.com>
2024-10-10 15:31:30 +02:00
ace177f20a AuthN: Set access token name (#94471)
* Set access token name
2024-10-09 17:08:11 +02:00
bd7850853e Auth: Attach external session info to Grafana session (#93849)
* initial from poc changes

* wip

* Remove public external session service

* Update swagger

* Fix merge

* Cleanup

* Add backgroud service for cleanup

* Add auth_module to user_external_session

* Add tests for token revocation functions

* Add secret migration capabilities for user_external_session fields

* Cleanup, refactor to address feedback

* Fix test
2024-10-08 11:03:29 +02:00