mirror of
https://github.com/vmware-tanzu/pinniped.git
synced 2026-07-28 11:02:52 +00:00
Use the correct field when encoding groups into the certificate.
Signed-off-by: Matt Moyer <moyerm@vmware.com>
This commit is contained in:
@@ -127,8 +127,8 @@ func (r *REST) Create(ctx context.Context, obj runtime.Object, createValidation
|
||||
|
||||
certPEM, keyPEM, err := r.issuer.IssuePEM(
|
||||
pkix.Name{
|
||||
CommonName: authResponse.User.GetName(),
|
||||
OrganizationalUnit: authResponse.User.GetGroups(),
|
||||
CommonName: authResponse.User.GetName(),
|
||||
Organization: authResponse.User.GetGroups(),
|
||||
},
|
||||
[]string{},
|
||||
clientCertificateTTL,
|
||||
|
||||
@@ -141,8 +141,8 @@ func TestCreateSucceedsWhenGivenATokenAndTheWebhookAuthenticatesTheToken(t *test
|
||||
issuer := mockcertissuer.NewMockCertIssuer(ctrl)
|
||||
issuer.EXPECT().IssuePEM(
|
||||
pkix.Name{
|
||||
CommonName: "test-user",
|
||||
OrganizationalUnit: []string{"test-group-1", "test-group-2"}},
|
||||
CommonName: "test-user",
|
||||
Organization: []string{"test-group-1", "test-group-2"}},
|
||||
[]string{},
|
||||
1*time.Hour,
|
||||
).Return([]byte("test-cert"), []byte("test-key"), nil)
|
||||
|
||||
Reference in New Issue
Block a user