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

Display certificate details in the Web UI #4724

Closed
jwarnier opened this issue Jun 8, 2018 · 20 comments
Closed

Display certificate details in the Web UI #4724

jwarnier opened this issue Jun 8, 2018 · 20 comments
Labels
community-sentiment Tracking high-profile issues from the community enhancement feature-request ui

Comments

@jwarnier
Copy link

jwarnier commented Jun 8, 2018

Is your feature request related to a problem? Please describe.
It would be great if Vault UI displayed the details of a certificate, such as the output of "openssl x509 -in file.pem -noout -text", instead of just showing it in PEM format.

Example URL where it happens:
https://localhost:8200/ui/vault/secrets/user-pki/show/cert/63-a8-57-b2-40-69-72-61-df-7c-c9-2f-e8-da-4a-5f-3b-d8-1b-f5

Describe the solution you'd like
Ideally, I'd like the details of the certificate to show on an alternate page (with a link between both), let's say, for e.g.:
https://localhost:8200/ui/vault/secrets/user-pki/show/cert**-details**/63-a8-57-b2-40-69-72-61-df-7c-c9-2f-e8-da-4a-5f-3b-d8-1b-f5

Describe alternatives you've considered
Alternatively, it could show this on the same page, but I fear it would easily become unreadable on any screen.

Explain any additional use-cases
My issue here was mainly to determine the issue and expiry dates of certificates, so was forced to dump the PEM and read it with openssl. This could be avoided with more details in the Web UI.

@djm300
Copy link

djm300 commented Dec 4, 2018

I would recommend implementing a view as here:

https://silvrback.s3.amazonaws.com/uploads/66cc69df-eb09-4821-adbe-2570bfb7536e/Screen%20Shot%202014-07-10%20at%2016.08.04_large.png
(from project https://dennis.silvrback.com/openssl-web-front-end)

Use case:

  • Easy to lookup certificates by name
  • The UI referenced here allow revocation of single or batch certificates (internally, we have a use case for this where user support might need to hand out a new certificate and revoking the old one)
  • Quick review of expiration dates (perhaps a filter allowing a view on only the soon-to-expire or expired ones)

@Lasering
Copy link

Lasering commented Sep 30, 2019

Just the subject, issuer, validity and SANs would already be very helpful

@crielly
Copy link

crielly commented Feb 20, 2020

Our use case for this is client certificates. We used Vault as the issuing CA for an IKEv2 VPN deployment, so one client cert per VPN user. Currently, we generate them via python's hvac library and essentially output a csv that maps the user's email to the certificate serial number so that it is easy to find the right cert for revocation later on.

Obviously it would be preferable if at least the subject line was available from within the vault GUI!

@skipperza
Copy link

Agreed. For me, subject in the list of certs is much more useful than serial number. Also, the state of the cert (expired, revoked, etc), is very useful.

@vrenjith
Copy link

+1
It's so confusing which certificate to select if we need to revoke one. We need to practically click each entry

@djm300
Copy link

djm300 commented Jun 12, 2020

Browsing around in the code, the UI code that selects which attributes are shows appears to be in
(https://github.com/hashicorp/vault/blob/master/ui/app/adapters/pki-certificate.js)

fetchByQuery(store, query) {
const { backend, id } = query;
return this.ajax(this.urlFor(backend, id), 'GET', this.optionsForQuery(id)).then(resp => {
const data = {
backend,
};
if (id) {
data.serial_number = id;
data.id = id;
data.id_for_nav = `cert/${id}`;
}
return assign({}, resp, data);
});
},

I don't have the time at hand now to do something about it but it's already a pointer

@rezaaa1359
Copy link

Is your feature request related to a problem? Please describe.
It would be great if Vault UI displayed the details of a certificate, such as the output of "openssl x509 -in file.pem -noout -text", instead of just showing it in PEM format.

Example URL where it happens:
https://localhost:8200/ui/vault/secrets/user-pki/show/cert/63-a8-57-b2-40-69-72-61-df-7c-c9-2f-e8-da-4a-5f-3b-d8-1b-f5

Describe the solution you'd like
Ideally, I'd like the details of the certificate to show on an alternate page (with a link between both), let's say, for e.g.:
https://localhost:8200/ui/vault/secrets/user-pki/show/cert**-details**/63-a8-57-b2-40-69-72-61-df-7c-c9-2f-e8-da-4a-5f-3b-d8-1b-f5

Describe alternatives you've considered
Alternatively, it could show this on the same page, but I fear it would easily become unreadable on any screen.

Explain any additional use-cases
My issue here was mainly to determine the issue and expiry dates of certificates, so was forced to dump the PEM and read it with openssl. This could be avoided with more details in the Web UI.

1 similar comment
@rezaaa1359
Copy link

Is your feature request related to a problem? Please describe.
It would be great if Vault UI displayed the details of a certificate, such as the output of "openssl x509 -in file.pem -noout -text", instead of just showing it in PEM format.

Example URL where it happens:
https://localhost:8200/ui/vault/secrets/user-pki/show/cert/63-a8-57-b2-40-69-72-61-df-7c-c9-2f-e8-da-4a-5f-3b-d8-1b-f5

Describe the solution you'd like
Ideally, I'd like the details of the certificate to show on an alternate page (with a link between both), let's say, for e.g.:
https://localhost:8200/ui/vault/secrets/user-pki/show/cert**-details**/63-a8-57-b2-40-69-72-61-df-7c-c9-2f-e8-da-4a-5f-3b-d8-1b-f5

Describe alternatives you've considered
Alternatively, it could show this on the same page, but I fear it would easily become unreadable on any screen.

Explain any additional use-cases
My issue here was mainly to determine the issue and expiry dates of certificates, so was forced to dump the PEM and read it with openssl. This could be avoided with more details in the Web UI.

@rezaaa1359
Copy link

These are the universal passwords of WhatsApp Messenger

@rezaaa1359
Copy link

Just the subject, issuer, validity and SANs would already be very helpful

@rezaaa1359
Copy link

Just the subject, issuer, validity and SANs would already be very helpful

@rezaaa1359
Copy link

These are the universal passwords of WhatsApp Messenger

@v-zhuravlev
Copy link

@delfuego
Copy link

Interestingly, it does — but only after you create a new cert. As in, I just updated my dev tier to 1.9.0, and didn't see any of the additional information about my existing certs listed in the interface. I then created a new cert, and after creating it, I could see the new information in the interface, for the new cert and for all the existing certs.

@hsimon-hashicorp
Copy link
Contributor

@delfuego do you have more information on that? Configuration, etc? Is that something you can reproduce? The parsing in the UI is from what's returned from the API, so it should be something that works with both old and new certs.

@delfuego
Copy link

@hsimon-hashicorp I unfortunately don't — I upgraded my dev tier already, and don't have another tier immediately ready to be upgraded that I could further test this on. It's truly weird, though, I agree!

@hsimon-hashicorp hsimon-hashicorp added the community-sentiment Tracking high-profile issues from the community label Jan 18, 2022
@aphorise
Copy link
Contributor

This seems resolved since 1.9.x - @jwarnier have you retested this since raising this issue and do you agree that it can now be closed?

@djm300
Copy link

djm300 commented Sep 13, 2022 via email

@aphorise
Copy link
Contributor

May be related to PR: #17236 - that includes additional certificate details in the Secrets / PKI overview listing.

@hellobontempo
Copy link
Contributor

Hi there! Thank you all for this request! 😄

Here to confirm that parsing certificate data was added to the UI in 1.9 PR here and more certificate details are surfaced in the PKI beta UI released in 1.13 #18737 (see PR for screenshots)

Because there can be millions of certificates, we’re unable to show any certificate details in the LIST view and at this time don’t have a way to parse this data without negatively impacting performance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community-sentiment Tracking high-profile issues from the community enhancement feature-request ui
Projects
None yet
Development

No branches or pull requests