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

web admin: wrong display of fields for PKI templates #6749

Closed
nqb opened this issue Dec 7, 2021 · 1 comment · Fixed by #6767
Closed

web admin: wrong display of fields for PKI templates #6749

nqb opened this issue Dec 7, 2021 · 1 comment · Fixed by #6767

Comments

@nqb
Copy link
Contributor

nqb commented Dec 7, 2021

Describe the bug
When you create a PKI template with Organisation, Organisation unit, State and Country, fields are saved in DB.
If you go back to your PKI template to enable SCEP setting and save. Then Organisation, Organisation unit, State and Country informations disappear when you switch to "General" tab.

If you close and get back to your template, you got same behavior. You need to refresh your web browser to get informations.

When I enabled SCEP setting on my PKI template, PATCH request sent by frontend doesn't contain Organisation, Organisation unit, State and Country fields.

However, the next API call to api/v1/pki/profiles contains this informations.

Has been noticed on PF 11.0.0, I was able to replicate on PF 11.1.0

To Reproduce
Steps to reproduce the behavior:

  1. Create a CA
  2. Create a PKI template with Organisation, Organisation unit, State and Country fields
  3. Edit yout PKI template to enable SCEP setting
  4. Save
  5. Open your PKI template and check values of Organisation, Organisation unit, State and Country fields

=> They are blank.

Expected behavior
Frontend should display values of PKI templates in DB

Additional context
Organisation, Organisation unit, State and Country have never been updated in DB, only SCEP setting is updated.

Certainly related to #6713

@nqb nqb added the Type: Bug label Dec 7, 2021
@nqb nqb added this to the +1 (patch release) milestone Dec 7, 2021
@satkunas
Copy link
Contributor

satkunas commented Dec 8, 2021

If you go back to your PKI template to enable SCEP setting and save. Then Organisation, Organisation unit, State and Country informations disappear when you switch to "General" tab.

This is a red herring. These fields are cleared regardless of the SCEP setting.

The fields are cleared because the PATCH /api/v1/pki/profile/:id response doesn't return the organisation, organisational_unit, country, or state.

@fdurand is it possible to have these fields included in the PATCH response?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants