Skip to content
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

added a flag to make common name optional if desired #3940

Merged
merged 5 commits into from
Feb 9, 2018
Merged

Conversation

vishalnayak
Copy link
Member

@vishalnayak vishalnayak commented Feb 8, 2018

Fixes #3836
Fixes #3918

This PR retains the current behavior as the default, which is to expect the common_name supplied while generating the cert. But, a flag can be flipped on the role to make common_name field optional.

I did not see anything that is making the alt_names mandatory. Unless I am missing something, there is nothing to be done w.r.t making alt_names optional. Also, the issue was not assertively mentioning the need to make changes to alt_names. Please provide feedback on the alt_names behavior and I'm happy to make any changes regarding that.

@vishalnayak vishalnayak added this to the 0.9.4 milestone Feb 8, 2018
@jefferai
Copy link
Member

jefferai commented Feb 8, 2018

There are other places in the logic that assume that cn exists and these should be updated to handle the case where cn is empty.

@@ -258,6 +258,10 @@ func fetchCertBySerial(ctx context.Context, req *logical.Request, prefix, serial
// If one does not pass, it is returned in the string argument.
func validateNames(req *logical.Request, names []string, role *roleEntry) string {
for _, name := range names {
if name == "" {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this should happen... Don't see a reason why we would want empty names in that list.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed.

@jefferai jefferai merged commit 58cab5f into master Feb 9, 2018
@jefferai jefferai deleted the pki-cn branch February 9, 2018 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants