* Moving POC files from #64283 to a new branch
Co-authored-by: Mihály Gyöngyösi <mgyongyosi@users.noreply.github.com>
* Adding missing permission definition
Co-authored-by: Mihály Gyöngyösi <mgyongyosi@users.noreply.github.com>
* Force the service instantiation while client isn't merged
Co-authored-by: Mihály Gyöngyösi <mgyongyosi@users.noreply.github.com>
* Merge conf with main
Co-authored-by: Mihály Gyöngyösi <mgyongyosi@users.noreply.github.com>
* Leave go-sqlite3 version unchanged
Co-authored-by: Mihály Gyöngyösi <mgyongyosi@users.noreply.github.com>
* tidy
Co-authored-by: Mihály Gyöngyösi <mgyongyosi@users.noreply.github.com>
* User SearchUserPermissions instead of SearchUsersPermissions
* Replace DummyKeyService with signingkeys.Service
* Use user🆔<id> as subject
* Fix introspection endpoint issue
* Add X-Grafana-Org-Id to get_resources.bash script
* Regenerate toggles_gen.go
* Fix basic.go
* Add GetExternalService tests
* Add GetPublicKeyScopes tests
* Add GetScopesOnUser tests
* Add GetScopes tests
* Add ParsePublicKeyPem tests
* Add database test for GetByName
* re-add comments
* client tests added
* Add GetExternalServicePublicKey tests
* Add other test case to GetExternalServicePublicKey
* client_credentials grant test
* Add test to jwtbearer grant
* Test Comments
* Add handleKeyOptions tests
* Add RSA key generation test
* Add ECDSA by default to EmbeddedSigningKeysService
* Clean up org id scope and audiences
* Add audiences to the DB
* Fix check on Audience
* Fix double import
* Add AC Store mock and align oauthserver tests
* Fix test after rebase
* Adding missing store function to mock
* Fix double import
* Add CODEOWNER
* Fix some linting errors
* errors don't need type assertion
* Typo codeowners
* use mockery for oauthserver store
* Add feature toggle check
* Fix db tests to handle the feature flag
* Adding call to DeleteExternalServiceRole
* Fix flaky test
* Re-organize routes comments and plan futur work
* Add client_id check to Extended JWT client
* Clean up
* Fix
* Remove background service registry instantiation of the OAuth server
* Comment cleanup
* Remove unused client function
* Update go.mod to use the latest ory/fosite commit
* Remove oauth2_server related configs from defaults.ini
* Add audiences to DTO
* Fix flaky test
* Remove registration endpoint and demo scripts. Document code
* Rename packages
* Remove the OAuthService vs OAuthServer confusion
* fix incorrect import ext_jwt_test
* Comments and order
* Comment basic auth
* Remove unecessary todo
* Clean api
* Moving ParsePublicKeyPem to utils
* re ordering functions in service.go
* Fix comment
* comment on the redirect uri
* Add RBAC actions, not only scopes
* Fix tests
* re-import featuremgmt in migrations
* Fix wire
* Fix scopes in test
* Fix flaky test
* Remove todo, the intersection should always return the minimal set
* Remove unecessary check from intersection code
* Allow env overrides on settings
* remove the term app name
* Remove app keyword for client instead and use Name instead of ExternalServiceName
* LogID remove ExternalService ref
* Use Name instead of ExternalServiceName
* Imports order
* Inline
* Using ExternalService and ExternalServiceDTO
* Remove xorm tags
* comment
* Rename client files
* client -> external service
* comments
* Move test to correct package
* slimmer test
* cachedUser -> cachedExternalService
* Fix aggregate store test
* PluginAuthSession -> AuthSession
* Revert the nil cehcks
* Remove unecessary extra
* Removing custom session
* fix typo in test
* Use constants for tests
* Simplify HandleToken tests
* Refactor the HandleTokenRequest test
* test message
* Review test
* Prevent flacky test on client as well
* go imports
* Revert changes from 526e48ad45
* AuthN: Change the External Service registration form (#68649)
* AuthN: change the External Service registration form
* Gen default permissions
* Change demo script registration form
* Remove unecessary comment
* Nit.
* Reduce cyclomatic complexity
* Remove demo_scripts
* Handle case with no service account
* Comments
* Group key gen
* Nit.
* Check the SaveExternalService test
* Rename cachedUser to cachedClient in test
* One more test case to database test
* Comments
* Remove last org scope
Co-authored-by: Mihály Gyöngyösi <mgyongyosi@users.noreply.github.com>
* Update pkg/services/oauthserver/utils/utils_test.go
* Update pkg/services/sqlstore/migrations/oauthserver/migrations.go
Remove comment
* Update pkg/setting/setting.go
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
---------
Co-authored-by: Mihály Gyöngyösi <mgyongyosi@users.noreply.github.com>
* Enable doc-validator for alerting directories
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Adds missing description frontmatter
* Fix some more links
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Fix some more links
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Fixes anchors
---------
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
* Move logs-related files to its own folder; update ownership paths
* Fix failing tests
* Put Flame graph and Node graph related files into separate folders
* Put RawPrometheus related files into a separate folder
* Put Table related files into a separate folder
* Add owners to three visualization categories
* observability-logs team owns everything under logs
* Move logs utils to their separate folder under Logs
* removing legacy AC checks from team API handlers
* Chore: remove `UserIDFilter` from team queries (#68820)
* remove userIDfilter from team queries in favour of RBAC SQL filtering
* fix typo
* remove redundant tests
* remove another unused function
* fix failing test
* 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>
* adding load time metrics for app init.
* chore: add the `metrics.ts` to the CODEOWNERS
* moved file according to PR feedback.
---------
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
* Add a wrapper to switch between the previous and new DS picker depending on the feature toggle advancedDataSourcePicker.
* Add a new component to represent the modal DS picker, which we will refer as advanced DS picker
Integrate this into the Edit panel, for now, until we're ready to replace everywhere the grafana-runtime DS picker by the wrapper.
* Replace Drawer component with the dropdown
* Adjust the first version of the styles to fit into this Figma design
* Adjust the design of the FileDropzoneDefaultChildren to match with the new DS modal but everywhere else is used nowadays.
---------
Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
* Use headings in bug report template
I've reported a lot of bugs recently, and I've found that headings
are a far better way to format bug reports.
See https://github.com/grafana/grafana/issues/65426 for an example. Thanks
* Switch from H1s to H2s
As per PR feedback, H1 already exists as the issue title :-)
* Add key service
Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
* Wire the service
* Rename Service
* Implement GetJWKS
* Slipt interface and implementation
Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
* Change implementation, add tests
* Align to the expected package hierarchy
* Update CODEOWNERS
* Align names and fix wire.go
* Update pkg/services/signingkeys/signingkeysimpl/service.go
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
* Update pkg/services/signingkeys/signingkeysimpl/service_test.go
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
* Update pkg/services/signingkeys/signingkeysimpl/service_test.go
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
* Update pkg/services/signingkeys/signingkeysimpl/service_test.go
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
* Add AddPrivateKey method to SigningKeysService
* Align tests to the guidelines
* Add test for GetJWKS() method
* Add comments to the interface
* Add FakeSigningKeysService
---------
Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
* remove dashboard previews backend
* remove dashboard previews backend
* bring back the migration
* bring back the migration
* bring back the migration
* Add initial authentication config page skeleton
* Add initial SAML config page WIP
* Add few more pages
* Add connect to IdP page
* Assertion mappings page stub and url params
* Able to save settings
* Some tweaks for authentication page
* Tweak behaviour
* Tweak provider name
* Move SAML config pages to enterprise
* minor refactor
* Able to reset settings
* Configure key and cert from UI
* Refactor WIP
* Tweak styles
* Optional save button
* Some tweaks for the page
* Don't show info popup when save settings
* Improve key/cert validation
* Fetch provider status and display on auth page
* Add settings list to the auth page
* Show call to action card if no auth configured
* clean up
* Show authentication page only if SAML available
* Add access control for SSO config page
* Add feature toggle for auth config UI
* Add code owners for auth config page
* Auth config UI disabled by default
* Fix feature toggle check
* Apply suggestions from review
* Refactor: use forms for steps
* Clean up
* Improve authentication page loading
* Fix CTA link
* Minor tweaks
* Fix page route
* Fix formatting
* Fix generated code formatting
* define initial service and add to wire
* update caching service interface
* add skipQueryCache header handler and update metrics query function to use it
* add caching service as a dependency to query service
* working caching impl
* propagate cache status to frontend in response
* beginning of improvements suggested by Lean - separate caching logic from query logic.
* more changes to simplify query function
* Decided to revert renaming of function
* Remove error status from cache request
* add extra documentation
* Move query caching duration metric to query package
* add a little bit of documentation
* wip: convert resource caching
* Change return type of query service QueryData to a QueryDataResponse with Headers
* update codeowners
* change X-Cache value to const
* use resource caching in endpoint handlers
* write resource headers to response even if it's not a cache hit
* fix panic caused by lack of nil check
* update unit test
* remove NONE header - shouldn't show up in OSS
* Convert everything to use the plugin middleware
* revert a few more things
* clean up unused vars
* start reverting resource caching, start to implement in plugin middleware
* revert more, fix typo
* Update caching interfaces - resource caching now has a separate cache method
* continue wiring up new resource caching conventions - still in progress
* add more safety to implementation
* remove some unused objects
* remove some code that I left in by accident
* add some comments, fix codeowners, fix duplicate registration
* fix source of panic in resource middleware
* Update client decorator test to provide an empty response object
* create tests for caching middleware
* fix unit test
* Update pkg/services/caching/service.go
Co-authored-by: Arati R. <33031346+suntala@users.noreply.github.com>
* improve error message in error log
* quick docs update
* Remove use of mockery. Update return signature to return an explicit hit/miss bool
* create unit test for empty request context
* rename caching metrics to make it clear they pertain to caching
* Update pkg/services/pluginsintegration/clientmiddleware/caching_middleware.go
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
* Add clarifying comments to cache skip middleware func
* Add comment pointing to the resource cache update call
* fix unit tests (missing dependency)
* try to fix mystery syntax error
* fix a panic
* Caching: Introduce feature toggle to caching service refactor (#66323)
* introduce new feature toggle
* hide calls to new service behind a feature flag
* remove licensing flag from toggle (misunderstood what it was for)
* fix unit tests
* rerun toggle gen
---------
Co-authored-by: Arati R. <33031346+suntala@users.noreply.github.com>
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
* scaffold new browse routes
* a part of rtk query
* load nested data
* .
* link nested dashboards items
* add comment about bad code, update codeowners
* tidies
* update react 18 related deps
* fix some types
* make sure we're on react-router-dom >= 5.3.3
* Use new root API
* Remove StrictMode for now - react 18 double rendering causes issues
* fix + ignore some @grafana/ui types
* fix some more types
* use renderHook from @testing-library/react in almost all cases
* fix storybook types
* rewrite useDashboardSave to not use useEffect
* make props optional
* only render if props are provided
* add correct type for useCallback
* make resourcepicker tests more robust
* fix ModalManager rendering
* fix some more unit tests
* store the click coordinates in a ref as setState is NOT synchronous
* fix remaining e2e tests
* rewrite dashboardpage tests to avoid act warnings
* undo lint ignores
* fix ExpanderCell types
* set SymbolCell type correctly
* fix QueryAndExpressionsStep
* looks like the types were actually wrong instead :D
* undo this for now...
* remove spinner waits
* more robust tests
* rewrite errorboundary test to not explicitly count the number of renders
* make urlParam expect async
* increase timeout in waitFor
* revert ExplorePage test changes
* Update public/app/features/dashboard/containers/DashboardPage.test.tsx
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
* Update public/app/features/dashboard/containers/PublicDashboardPage.test.tsx
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
* Update public/app/features/dashboard/containers/PublicDashboardPage.test.tsx
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
* Update public/app/features/dashboard/containers/PublicDashboardPage.test.tsx
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
* skip fakeTimer test, ignore table types for now + other review comments
* update package peerDeps
* small tweak to resourcepicker test
* update lockfile...
* increase timeout in sharepublicdashboard tests
* ensure ExplorePaneContainer passes correct queries to initializeExplore
* fix LokiContextUI test
* fix unit tests
* make importDashboard flow more consistent
* wait for dashboard name before continuing
* more test fixes
* readd dashboard name to variable e2e tests
* wait for switches to be enabled before clicking
* fix modal rendering
* don't use @testing-library/dom directly
* quick fix for rendering of panels in firefox
* make PromQueryField test more robust
* don't wait for chartData - in react 18 this can happen before the wait code even gets executed
---------
Co-authored-by: kay delaney <kay@grafana.com>
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
remove two reviewer checklist items
Remove FRR and compatibility checks, because the FRR is only for new features and compatibility is impossible to confirm.
* extract kindsys
* reinstate kindsys report
This may end up living somewhere else (or not! who knows!), but the important part is that I don't get rid of it right now :)
I hate the package layout (kindsysreport/codegen) for the main function and will take pretty much any alternative suggestion, but we can change also change it later.
Note that the generated report.json is in a different location - anything using this (ops something) needs to be updated.
* kindsysreport in codeowners
* Update codeowners file to transfer ownership of a few panels while dataviz is forming
* Update kindsys report
---------
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
* chore: remove export service POC from main
This is a POC and we'll see it, or something like it, again!
* remove frontend changes
---------
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
* MVP of a new datasource picker
* Add datasource select history, naming DatasourceSelect -> DataSourceDrawer
* refactor cards
* Cleanup and fixing sort order for recents
* add feature flag
* fix feature flag name and use it
* Highlight selected
* Move new ds picker to core
* Restore original datasource picker
* Remove unused property
* update yarn.lock
* Rename folder, update codeowners
* add test for util functions
* Remove es-lint exception
* Change feature toggle description
* remove unnecessary if
Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>
* Make test a bit more clear
Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>
* Clean up api, filter once and before maps, minor code cleanup
* Fix prettier issue
---------
Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>
* Reorder documentation section to be first by depth, then alphabetically
This matches the organization described in the top of the CODEOWNERS
file.
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Update technical documentation CODEOWNERS to reflect areas of responsibility
@Eve832 is responsible for all docs not owned by another technical
writer.
@Eve832 and @GrafanaWriter are responsible for Administration, Data
sources, Explore, and Release notes.
@Eve and the plugins teams are responsible for developer plugins documentation.
@brendamuir is responsible for all alerting documentation.
@chri2547 is responsible for Fundamentals, Getting started,
Introduction, Setup Grafana, Upgrade guide, and What's new.
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Add explicit code ownership for /devenv/README.md
This was lost when the README.md pattern was made more strict.
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Add @josmperez to plugins reviews
---------
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* add anon sessions package
* add usage stat fn
* implement count for cache
* add anonservice to authn broker
* lint
* add tests for remote cache count
* move anon service to services
* wrap tagging in goroutine
* make func used
* add new scenario to config
* make workflow run on opened issues
* revert-dont run on opened
* action for newly opened issues
* move new action config
* remove opened from commands
* change name
* Update .github/workflows/issue-opened.yml
ty!
Co-authored-by: Timur Olzhabayev <timur.olzhabayev@grafana.com>
* make comment clearer
---------
Co-authored-by: Timur Olzhabayev <timur.olzhabayev@grafana.com>