Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions app/controlplane/internal/server/grpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,17 +234,17 @@ func craftMiddleware(opts *Opts) []middleware.Middleware {
usercontext.WithAttestationContextFromAPIToken(opts.APITokenUseCase, opts.OrganizationUseCase, logHelper),
// 2.c - Set Attestation context from user token
usercontext.WithAttestationContextFromUser(opts.UserUseCase, logHelper),
// Validate the CAS Backend is fully configured and valid
selector.Server(
usercontext.ValidateCASBackend(opts.CASBackendUseCase),
usercontext.BlockIfCASBackendNotValid(opts.CASBackendUseCase),
).Match(requireFullyConfiguredCASBackendMatcher()).Build(),
// Store all memberships in the context
usercontext.WithCurrentMembershipsMiddleware(opts.MembershipUseCase),
// 2.d - Set its robot account from federated delegation
usercontext.WithAttestationContextFromFederatedInfo(opts.OrganizationUseCase, logHelper),
// Store all memberships in the context
usercontext.WithCurrentMembershipsMiddleware(opts.MembershipUseCase),
// 3 - Update API Token last usage
usercontext.WithAPITokenUsageUpdater(opts.APITokenUseCase, logHelper),
// 4 - Validate the CAS Backend is fully configured and valid
selector.Server(
usercontext.ValidateCASBackend(opts.CASBackendUseCase),
usercontext.BlockIfCASBackendNotValid(opts.CASBackendUseCase),
).Match(requireFullyConfiguredCASBackendMatcher()).Build(),
).Match(requireRobotAccountMatcher()).Build(),
)

Expand Down
Loading