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

UI: PKI config refactor #18639

Merged
merged 11 commits into from
Jan 10, 2023
Merged

UI: PKI config refactor #18639

merged 11 commits into from
Jan 10, 2023

Conversation

hashishaw
Copy link
Collaborator

Updates the PKI Configure flow so that all the options share one model. Follow-on work will involve creating form components for each of the other options.

Screen Shot 2023-01-09 at 3 49 15 PM

Copy link
Contributor

@hellobontempo hellobontempo left a comment

Choose a reason for hiding this comment

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

Nice job refactoring to accommodate a single config model! I like this way of handling the form - it feels easier to follow! Some minor questions/suggestions, nothing blocking 😎

ui/app/models/pki/config.js Outdated Show resolved Hide resolved
ui/app/serializers/pki/config.js Outdated Show resolved Hide resolved
import { setupTest } from 'vault/tests/helpers';
import { setupMirage } from 'ember-cli-mirage/test-support';

module('Unit | Adapter | pki/config', function (hooks) {
Copy link
Contributor

Choose a reason for hiding this comment

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

👏 👏

ui/tests/unit/models/pki/config-test.js Outdated Show resolved Hide resolved
ui/tests/unit/serializers/pki/config-test.js Outdated Show resolved Hide resolved
@lazyCapabilities(apiPath`${'backend'}/issuers/import/bundle`, 'backend') importBundlePath;
@lazyCapabilities(apiPath`${'backend'}/issuers/generate/root/${'type'}`, 'backend', 'type')
generateIssuerRootPath;
@lazyCapabilities(apiPath`${'backend'}/issuers/generate/intermediate/${'type'}`, 'backend', 'type')
Copy link
Contributor

Choose a reason for hiding this comment

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

Just a note for later - I think both of these generate capability paths will have to be without type since that's selected by the user in the form and so it will always be undefined since type won't exist on the model until it's selected?

shouldUseIssuerEndpoint() {
const { config } = this.args;
// To determine which endpoint the config adapter should use,
// we want to check highest-privileged capabilities and use the
// fallback (issuer path) if user does not have permissions.
// we want to check capabilities on the newer endpoints (those
Copy link
Contributor

Choose a reason for hiding this comment

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

thank you for this comment!

@hashishaw hashishaw merged commit 29533ca into main Jan 10, 2023
@hashishaw hashishaw deleted the ui/pki-config-refactor branch January 10, 2023 22:13
joshbrand pushed a commit that referenced this pull request Jan 11, 2023
dhuckins pushed a commit that referenced this pull request Jan 19, 2023
dhuckins pushed a commit that referenced this pull request Jan 19, 2023
AnPucel pushed a commit that referenced this pull request Jan 25, 2023
AnPucel pushed a commit that referenced this pull request Feb 3, 2023
jayant07-yb pushed a commit to jayant07-yb/hashicorp-vault-integrations that referenced this pull request Mar 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants