Commit Graph

10 Commits

Author SHA1 Message Date
Mihai Doarna 9e07387de2 add integration tests and fix remaining issues 2025-10-07 17:45:18 +03:00
Mihai Doarna 414c555a29 implement create method for team bindings 2025-10-03 17:52:00 +03:00
Mihai Doarna 0f60e2208e
IAM: Implement update method in team API (#111660)
* implement team update in legacy store

* add unit tests

* add integration test

* set permissions for user in integration tests

* add more integration tests for update

* update validations

* add unit tests for ValidateOnUpdate() func

* fix integration test
2025-10-03 12:48:38 +03:00
Mihai Doarna 1e4358163b
IAM: Implement delete in team API (#111367)
* implement delete in team API

* add unit tests for legacy sql

* add integration tests

* remove comment

* remove org_id from delete team sql command

* fetch team ID before deleting it
2025-09-25 14:55:54 +03:00
Mihai Doarna 9d9dca3208
IAM: Adds the team creation endpoint in app platform (#111003)
* implement team creation for legacy store

* add generated code

* add basic integration test

* add new fields to get and list teams

* fix sql tests for teams

* register dual writer for team resource

* add generated code

* add more sql tests for team creation

* address feedback

* add integration tests
2025-09-18 14:43:07 +03:00
Misi 29551a6edf
IAM: Implement Delete in Service Account API (#110584)
* wip

* IAM: Create Service Account

* Add dual writer

* Update openapi_test.go

* Add integration tests

* Add sql tests

* Add Role to SA spec, add validation, add DBTime, add tests

* Format, update test

* Fixes

* Add check for External

* wip

* Fix merge

* wip

* Use plugin name instead of title for ext svc account login

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

* Remove OrgID from DeleteUserCommand

* Use the new authorizer

* Fix tests

* cleanup

* Move test to enterprise

* Revert unnecessary change

* Address feedback

* Revert "Address feedback"

This reverts commit 8ab9559076.

---------

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2025-09-16 15:39:01 +02:00
Misi badea8bc37
IAM: Create Service Account API and legacy store impl (#110411)
* wip

* IAM: Create Service Account

* Add dual writer

* Update openapi_test.go

* Add integration tests

* Add sql tests

* Add Role to SA spec, add validation, add DBTime, add tests

* Format, update test

* Fixes

* Add check for External

* Address feedback

* Update tests

* Address feedback

* make gen-go

* Simplify a bit

* Fixes

* make update-workspace

* Update pkg/registry/apis/iam/serviceaccount/store.go

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

* Address feedback, add test for generateName

---------

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2025-09-08 14:31:32 +02:00
Misi c6a6b9fdd2
IAM: Create and delete user from the legacy store (#107694)
* Add Create for User + DualWriter setup

* Add delete User

* Fix delete + access check

* Add tests for delete user

* Add tests for create user

* Fixes

* Use sqlx session to fix database locked issues

* wip authz checks

* legacyAccessClient

* Update legacyAccessClient, add tests for create user

* Close rows before running other queries

* Use ExecWithReturningId

* Verify deletion in the tests

* Add Validate and Mutate

* Other changes

* Address feedback

* Update tests

---------

Co-authored-by: Gabriel Mabille <gabriel.mabille@grafana.com>
2025-07-17 11:50:40 +02:00
Matheus Macabu fc9f32a9f6
SQLTemplates: Add helper to ensure all templates have a test-case (#103964)
* SQLTemplates: Add helper to ensure all templates have a test-case associated

* UnifiedStorage: Add missing sql template test case

* LegacyDashboards: Add sql templates fs to test cases for exhaustiveness check

* RBACStore: Add sql templates fs to test cases for exhaustiveness check

* LegacyIAM: Add missing sql template test cases
2025-04-22 11:21:51 +02:00
Ryan McKinley 9338e40dc3
K8s/IAM: Move identity.grafana.app to iam.grafana.app (#92929) 2024-09-05 09:43:54 +03:00