a8b07b0c81
* Add authlib gRPC authenticators for in-proc mode * implement `StaticRequester` signing in the unified resource client - [x] when the `claims.AuthInfo` value type is `identity.StaticRequester`, and there's no ID token set, create an internal token and sign it with symmetrical key. This is a workaround for `go-jose` not offering the possibility to create an unsigned token. - [x] update `IDClaimsWrapper` to support the scenario above - [x] Switch to using `claims.From()` in `dashboardSqlAccess.SaveDashboard()` --------- Co-authored-by: gamab <gabriel.mabille@grafana.com>
15 lines
380 B
Go
15 lines
380 B
Go
package grpcutils
|
|
|
|
import (
|
|
authnlib "github.com/grafana/authlib/authn"
|
|
)
|
|
|
|
func NewInProcGrpcAuthenticator() *authnlib.GrpcAuthenticator {
|
|
// In proc grpc ID token signature verification can be skipped
|
|
return authnlib.NewUnsafeGrpcAuthenticator(
|
|
&authnlib.GrpcAuthenticatorConfig{},
|
|
authnlib.WithDisableAccessTokenAuthOption(),
|
|
authnlib.WithIDTokenAuthOption(true),
|
|
)
|
|
}
|