You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: re-curate compliance-057-ds oracle for v11.4.0 (ssoSettingsApi)
auditLoggingAppPlatform was added to grafana/grafana main on 2025-12-29,
a full year after v11.4.0 (2024-12-05). It doesn't exist in any release.
Re-curated to ssoSettingsApi feature flag which exists at v11.4.0 with
rich cross-component wiring: flag definition, SSO settings interfaces,
database persistence, REST API, OAuth gating, LDAP registration, RBAC.
10 oracle files across 4 architectural layers. Self-check: 1.0000.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
"text": "Comprehensive explanation of how the 4 layers connect: feature flag definition → audit infrastructure → API server wiring → DI registration."
50
+
"text": "Comprehensive explanation of how the 4 layers connect: feature flag definition → SSO settings infrastructure → API & authentication wiring → access control & DI registration."
49
51
}
50
52
```
51
53
52
54
**Important**: Use `grafana/grafana` as the exact `repo` identifier. Strip the
53
55
`github.com/` prefix that Sourcegraph MCP tools return.
54
56
55
57
**Deep Search hint**: This task requires synthesizing across feature management,
56
-
API server infrastructure, and dependency injection layers. Deep Search is
57
-
particularly well-suited for tracing these cross-cutting concerns.
58
+
SSO settings infrastructure, OAuth connectors, and authentication registration
59
+
layers. Deep Search is particularly well-suited for tracing these cross-cutting
60
+
concerns.
58
61
59
62
## Evaluation
60
63
61
64
Your answer will be scored on:
62
65
-**File recall and precision**: Did you find the architecturally significant files across all 4 layers?
63
-
-**Keyword coverage**: Does your answer reference the key interfaces and types (`auditLoggingAppPlatform`, `APIGroupAuditor`, `audit.Backend`, `NoopBackend`, `Logger`)?
66
+
-**Keyword coverage**: Does your answer reference the key interfaces and types (`ssoSettingsApi`, `FlagSsoSettingsApi`, `SSOSettings`, `Reloadable`, `SSOSettingsStore`)?
64
67
-**Provenance**: Does your answer cite the correct repos and directory paths?
65
68
-**Rubric judge**: An LLM judge will assess evidence completeness, cross-component tracing, auditor actionability, and technical accuracy.
"description": "Accurate: Does the answer identify all 4 layers of the audit control (feature flag definition, audit infrastructure, API server wiring, DI registration)? Attributed: Are all layers backed by specific file paths? Actionable: Could an auditor verify each layer independently?",
4
+
"description": "Accurate: Does the answer identify all 4 layers of the SSO settings control (feature flag definition, SSO settings infrastructure, API & authentication wiring, access control & DI registration)? Attributed: Are all layers backed by specific file paths? Actionable: Could an auditor verify each layer independently?",
5
5
"max_score": 3
6
6
},
7
7
{
8
8
"metric": "cross_component_tracing",
9
-
"description": "Accurate: Does the answer trace the connection between feature flag (auditLoggingAppPlatform) → audit backend (Logger/Event/Policy) → API server wiring (APIGroupAuditor, service.go)? Attributed: Are the connections between layers explicitly described? Actionable: Does the explanation show how enabling the feature flag activates the audit pipeline?",
9
+
"description": "Accurate: Does the answer trace the connection between feature flag (ssoSettingsApi / FlagSsoSettingsApi) → SSO settings infrastructure (Service, Store, Reloadable) → API endpoints & OAuth connector loading (api.go, socialimpl/service.go) → access control evaluators (ssoutils/utils.go)? Attributed: Are the connections between layers explicitly described? Actionable: Does the explanation show how enabling the feature flag activates the SSO settings pipeline?",
10
10
"max_score": 3
11
11
},
12
12
{
13
13
"metric": "actionable_for_auditor",
14
-
"description": "Accurate: Could a SOC 2 auditor use this evidence bundle to verify the audit logging control is implemented? Attributed: Does the bundle clearly state what each file's role is in the control? Actionable: Is the evidence organized so a non-developer auditor can follow the control chain?",
14
+
"description": "Accurate: Could a SOC 2 auditor use this evidence bundle to verify the SSO settings control is implemented? Attributed: Does the bundle clearly state what each file's role is in the control? Actionable: Is the evidence organized so a non-developer auditor can follow the control chain?",
15
15
"max_score": 2
16
16
},
17
17
{
18
18
"metric": "technical_accuracy",
19
-
"description": "Accurate: Are the cited file paths, interfaces (Logger, APIGroupAuditor), and struct names (Event, NoopBackend) technically correct? Attributed: Do the file paths match actual files in grafana/grafana v11.4.0? Actionable: Could a developer use these references to locate the exact code?",
19
+
"description": "Accurate: Are the cited file paths, interfaces (Service, Reloadable, Store), and type names (SSOSettings, SSOSettingsStore, FallbackStrategy) technically correct? Attributed: Do the file paths match actual files in grafana/grafana v11.4.0? Actionable: Could a developer use these references to locate the exact code?",
"text": "The Grafana audit logging control spans 4 architectural layers, forming a complete SOC 2 evidence chain. Layer 1 — Feature Flag Definition: pkg/services/featuremgmt/registry.go defines the auditLoggingAppPlatform feature flag in the feature toggle registry, and pkg/services/featuremgmt/toggles_gen.go contains the generated Go constant FlagAuditLoggingAppPlatform used throughout the codebase. Layer 2 — Audit Infrastructure: pkg/apiserver/auditing/logger.go defines the Logger interface that audit backends must implement, pkg/apiserver/auditing/event.go defines the Event struct modeling individual audit events, pkg/apiserver/auditing/policy.go implements the policy evaluation logic that determines which API operations should be audited, and pkg/apiserver/auditing/noop.go provides the NoopBackend implementation used when audit logging is disabled. Layer 3 — API Server Wiring: pkg/services/apiserver/builder/common.go defines the APIGroupAuditor interface that API group builders implement to declare their audit policies, pkg/services/apiserver/builder/helper.go contains the policy aggregation logic that combines per-group audit policies with the global audit.Backend, and pkg/services/apiserver/service.go is the main API server service that wires the audit backend into the server startup via dependency injection. Layer 4 — DI Registration: pkg/registry/apis/wireset.go contains the Wire provider set that registers the audit components in Grafana's dependency injection container, ensuring the audit backend is available throughout the application lifecycle.",
14
+
"text": "The Grafana SSO settings control spans 4 architectural layers, forming a complete SOC 2 evidence chain for the ssoSettingsApi feature flag. Layer 1 — Feature Flag Definition: pkg/services/featuremgmt/registry.go defines the ssoSettingsApi feature flag in the feature toggle registry with Stage GeneralAvailability and Expression true (enabled by default), owned by the identityAccessTeam. pkg/services/featuremgmt/toggles_gen.go contains the generated Go constant FlagSsoSettingsApi used throughout the codebase to gate SSO settings functionality. Layer 2 — SSO Settings Infrastructure: pkg/services/ssosettings/ssosettings.go defines three core interfaces: Service (List, GetForProvider, Upsert, Delete, Patch, RegisterReloadable, Reload), Reloadable (Reload, Validate for live configuration updates), and Store (Get, List, Upsert, Delete for persistence), plus FallbackStrategy for config-file backward compatibility. pkg/services/ssosettings/models/models.go defines the SSOSettings struct with Xorm persistence annotations (ID, Provider, Settings map, Created, Updated, IsDeleted, Source) and JSON marshal/unmarshal methods that convert between snake_case and camelCase. pkg/services/ssosettings/database/database.go implements SSOSettingsStore with ProvideStore constructor, providing Get, List, Upsert (with UUID generation), and Delete (soft delete) operations against the sso_setting table. Layer 3 — API & Authentication Wiring: pkg/services/ssosettings/api/api.go defines the REST API at /api/v1/sso-settings with RegisterAPIEndpoints that registers GET /, GET /:key, PUT /:key, DELETE /:key endpoints, all gated by access control middleware (ActionSettingsRead/ActionSettingsWrite with ScopeSettingsOAuth). pkg/login/social/socialimpl/service.go contains ProvideService for the SocialService which, when FlagSsoSettingsApi is enabled, loads all OAuth provider settings from the SSO settings service and creates OAuth connectors dynamically instead of reading from static config. pkg/services/authn/authnimpl/registration.go contains the authentication client registration logic that checks both FlagSsoSettingsApi and FlagSsoSettingsLDAP to conditionally register the LDAP authentication client even when LDAPAuthEnabled is false in static config. Layer 4 — Access Control & DI Registration: pkg/services/accesscontrol/ssoutils/utils.go defines EvalAuthenticationSettings (evaluates SAML write+read and LDAP status read permissions) and OauthSettingsEvaluator (dynamically generates evaluators for all configurable OAuth providers), which the admin navigation and API routing use to gate access to the SSO settings UI. pkg/services/ssosettings/ssosettingsimpl/service.go contains the ProvideService DI constructor that wires together the database store (via database.ProvideStore), fallback strategies (OAuthStrategy, LDAPStrategy, SAMLStrategy), the reloadables map, and conditionally registers the API endpoints when FlagSsoSettingsApi is enabled, completing the dependency injection chain.",
0 commit comments