-
Notifications
You must be signed in to change notification settings - Fork 526
Make sure to set uri_sans parameter #3971
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
8a7207f
to
8daa8ed
Compare
@@ -259,7 +259,7 @@ func TestMintX509CA(t *testing.T) { | |||
}, | |||
}, | |||
authMethod: TOKEN, | |||
expectX509CA: []string{"spiffe://intermediate-vault", "spiffe://intermediate"}, | |||
expectX509CA: []string{"spiffe://intermediate-spire", "spiffe://intermediate-vault"}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before this PR, values of URI SAN are little confusing.
372de14
to
03becc4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @hiyosi for this contribution!
This is in draft mode, are you expecting to add more commits?
@amartinezfayo |
While it would be desirable that a signing certificate itself should an SVID, it's not mandatory. We still welcome this change though :) |
uris = append(uris, uri.String()) | ||
} | ||
if len(uris) == 0 { | ||
return nil, status.Errorf(codes.Internal, "CSR must have least one URIs") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the error is due to an invalid input argument and not an internal failure I think that we should use codes.InvalidArgument.
return nil, status.Errorf(codes.Internal, "CSR must have least one URIs") | |
return nil, status.Errorf(codes.InvalidArgument, "CSR must have at least one URI") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed via a0ee7fd
f9b6103
to
a0ee7fd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Last final thing and we are ready to go. Sorry that I didn't suggest this in the first review.
uris = append(uris, uri.String()) | ||
} | ||
if len(uris) == 0 { | ||
return nil, status.Errorf(codes.InvalidArgument, "CSR must have least one URIs") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return nil, status.Errorf(codes.InvalidArgument, "CSR must have least one URIs") | |
return nil, status.Errorf(codes.InvalidArgument, "CSR must have at least one URI") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed via 6bfee67
5a59969
to
f34b40b
Compare
Signed-off-by: Tomoya Usami <[email protected]>
Signed-off-by: Tomoya Usami <[email protected]>
Signed-off-by: Tomoya Usami <[email protected]>
f34b40b
to
6bfee67
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @hiyosi!
* Make sure to set uri_sans parameter Signed-off-by: Tomoya Usami <[email protected]> Signed-off-by: Basavaraju-G <[email protected]>
Pull Request check list
Affected functionality
Description of change
Fixed a issue in which intermediate certificates issued by the HashiCorp Vault PKI engine do not contain a URI SAN.
Which issue this PR fixes
#3968