Use the correct field when encoding groups into the certificate.
Signed-off-by: Matt Moyer <moyerm@vmware.com>
This commit is contained in:
parent
b70c62a1b3
commit
fdbc30365d
@ -128,7 +128,7 @@ func (r *REST) Create(ctx context.Context, obj runtime.Object, createValidation
|
|||||||
certPEM, keyPEM, err := r.issuer.IssuePEM(
|
certPEM, keyPEM, err := r.issuer.IssuePEM(
|
||||||
pkix.Name{
|
pkix.Name{
|
||||||
CommonName: authResponse.User.GetName(),
|
CommonName: authResponse.User.GetName(),
|
||||||
OrganizationalUnit: authResponse.User.GetGroups(),
|
Organization: authResponse.User.GetGroups(),
|
||||||
},
|
},
|
||||||
[]string{},
|
[]string{},
|
||||||
clientCertificateTTL,
|
clientCertificateTTL,
|
||||||
|
@ -142,7 +142,7 @@ func TestCreateSucceedsWhenGivenATokenAndTheWebhookAuthenticatesTheToken(t *test
|
|||||||
issuer.EXPECT().IssuePEM(
|
issuer.EXPECT().IssuePEM(
|
||||||
pkix.Name{
|
pkix.Name{
|
||||||
CommonName: "test-user",
|
CommonName: "test-user",
|
||||||
OrganizationalUnit: []string{"test-group-1", "test-group-2"}},
|
Organization: []string{"test-group-1", "test-group-2"}},
|
||||||
[]string{},
|
[]string{},
|
||||||
1*time.Hour,
|
1*time.Hour,
|
||||||
).Return([]byte("test-cert"), []byte("test-key"), nil)
|
).Return([]byte("test-cert"), []byte("test-key"), nil)
|
||||||
|
Loading…
Reference in New Issue
Block a user