package auth
- Alphabetic
- Public
- Protected
Type Members
- sealed trait AccessLevel extends Product with Serializable
- abstract class AsyncForwardingListener[ReqT] extends Listener[ReqT]
This listener buffers all messages until
setNextListener
is called, at which point all buffered messages are sent to the given listener.This listener buffers all messages until
setNextListener
is called, at which point all buffered messages are sent to the given listener. From then on, all future messages are sent directly to the given listener.The target listener is usually created through
Contexts.interceptCall
orServerCallHandler.startCall
.- Annotations
- @SuppressWarnings()
- trait AuthService extends AnyRef
An interface for authorizing the ledger API access to a participant.
An interface for authorizing the ledger API access to a participant.
The AuthService is responsible for converting request metadata (such as the HTTP headers) into a ClaimSet. These claims are then used by the ledger API server to check whether the request is authorized.
- The authorization information MUST be specified in the
Authorization
header. - The value of theAuthorization
header MUST start withBearer
(notice the trailing space of the prefix). - An AuthService implementation MAY use other headers when converting metadata to claims.For example, a participant could: - Ask all ledger API users to attach an
Authorization
header with a JWT token as the header value. - ImplementdecodeMetadata()
such that it reads the JWT token from the corresponding HTTP header, validates the token, and converts the token payload to ClaimSet. - class AuthServiceJWT extends AuthServiceJWTBase
- abstract class AuthServiceJWTBase extends AuthService with NamedLogging
An AuthService that reads a JWT token from a
Authorization: Bearer
HTTP header.An AuthService that reads a JWT token from a
Authorization: Bearer
HTTP header. The token is expected to use the format as defined in com.daml.jwt.AuthServiceJWTPayload: - class AuthServicePrivilegedJWT extends AuthServiceJWTBase
- sealed abstract class AuthorizationError extends AnyRef
- class AuthorizationInterceptor extends ServerInterceptor with NamedLogging
This interceptor uses the given AuthService to get ClaimSet.Claims for the current request, and then stores them in the current io.grpc.Context.
- final case class AuthorizedUser(userId: String, allowedServices: Seq[String]) extends Product with Serializable
- final class Authorizer extends NamedLogging with TelemetryTracing
A simple helper that allows services to use authorization claims that have been stored by AuthorizationInterceptor.
- final case class CantonAdminToken(secret: String) extends Product with Serializable
- class CantonAdminTokenAuthService extends AuthService
AuthService interceptor used for internal canton services
AuthService interceptor used for internal canton services
Internal Canton services such as the PingService or the DarService require access to the Ledger-Api server. However, if the Ledger-Api server is configured with JWT, they will fail. But we can't expect that Canton obtains an oauth token from a third party service during startup.
Therefore, we create on each startup a master token which is only ever shared internally.
- sealed abstract class Claim extends AnyRef
A claim is a single statement about what an authenticated user can do with the ledger API.
A claim is a single statement about what an authenticated user can do with the ledger API.
Note: this ADT is expected to evolve in the future by adding new cases for more fine grained claims. The existing cases should be treated as immutable in order to guarantee backwards compatibility for AuthService implementations.
- final case class ClaimActAsParty(name: Party) extends Claim with Product with Serializable
Authorized to act as the given party, including: - Reading all data for the given party - Creating contracts on behalf of the given party - Exercising choices on behalf of the given party
- final case class ClaimReadAsParty(name: Party) extends Claim with Product with Serializable
Authorized to read all data for the given party.
Authorized to read all data for the given party.
Does NOT authorize to issue commands.
- sealed trait ClaimSet extends AnyRef
- final case class NoOpOngoingAuthorizationFactory() extends OngoingAuthorizationFactory with Product with Serializable
- trait OngoingAuthorizationFactory extends AnyRef
- trait StatelessAuthorizer extends AnyRef
- class UserConfigAuthService extends AuthServiceJWTBase
Value Members
- object AccessLevel extends Serializable
- case object AdminAuthorizer extends StatelessAuthorizer with Product with Serializable
- object AuthService
- object AuthServiceJWT
- object AuthServiceWildcard extends AuthService
An AuthService that authorizes all calls by always returning a wildcard ClaimSet.Claims
- object AuthorizationChecksErrors extends AuthorizationChecksErrorGroup
- Annotations
- @Explanation(explanation = "Authentication and authorization errors.")
- object AuthorizationError
- object AuthorizationInterceptor
- object CantonAdminToken extends Serializable
- case object ClaimActAsAnyParty extends Claim with Product with Serializable
Authorized to act as any party, including: - Reading all data for all parties - Creating contract on behalf of any party - Exercising choices on behalf of any party
- case object ClaimAdmin extends Claim with Product with Serializable
Authorized to use all admin services.
Authorized to use all admin services. Does not authorize to use non-admin services.
- case object ClaimIdentityProviderAdmin extends Claim with Product with Serializable
Authorized to use admin services for the configured identity provider.
Authorized to use admin services for the configured identity provider. Does not authorize to use non-admin services.
- case object ClaimPublic extends Claim with Product with Serializable
Authorized to use all "public" services, i.e., those that do not require admin rights and do not depend on any Daml party.
Authorized to use all "public" services, i.e., those that do not require admin rights and do not depend on any Daml party. Examples include the LedgerIdentityService or the PackageService.
- object ClaimSet