Skip to content

Commit 377855b

Browse files
authored
add auth type related consts (#391)
Signed-off-by: Wei Liu <[email protected]>
1 parent 67d4817 commit 377855b

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

operator/v1/types_clustermanager.go

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,25 @@ type RegistrationHubConfiguration struct {
118118
RegistrationDrivers []RegistrationDriverHub `json:"registrationDrivers,omitempty"`
119119
}
120120

121+
const (
122+
// AwsIrsaAuthType represents the authentication type that uses AWS IRSA
123+
AwsIrsaAuthType = "awsirsa"
124+
// CSRAuthType represents the authentication type that uses Kubernetes CSR
125+
CSRAuthType = "csr"
126+
// GRPCAuthType represents the authentication type that uses gRPC.
127+
GRPCAuthType = "grpc"
128+
)
129+
130+
// GRPCAuthSigner is the signer name used when creating CSRs for gRPC authentication.
131+
const GRPCAuthSigner = "open-cluster-management.io/grpc"
132+
133+
const (
134+
// CSRUsernameAnnotation is added to a CSR to identify the user who requested the CSR.
135+
// This should only be honored when registration driver is grpc and the csr user name
136+
// is service account of grpc server.
137+
CSRUsernameAnnotation = "open-cluster-management.io/csr-user"
138+
)
139+
121140
type RegistrationDriverHub struct {
122141

123142
// Type of the authentication used by hub to initialize the Hub cluster. Possible values are csr and awsirsa.

0 commit comments

Comments
 (0)