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 engine (redesign) routing changes #17997

Merged
merged 10 commits into from
Nov 18, 2022

Conversation

hellobontempo
Copy link
Contributor

No description provided.

@@ -20,7 +20,7 @@ const KEY_BITS_OPTIONS = {
any: [0],
};

export default class KeyParameters extends Component {
export default class PkiKeyParameters extends Component {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@hashishaw and I had discussed nesting these components in a pki/ folder so that there weren't any conflicts with the addon engine. But for some reason the role form had trouble finding <Pki::KeyParameters> so I opted for prefixing the files with pki- instead

this.route('generate-root');
this.route('generate-csr');
});
this.route('create');
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The initial configuration has three radio buttons that provide a different configuration view, but they are all the same route. Instead of them each being separate routes, different components will render based on the user's selection
Screen Shot 2022-11-16 at 3 34 34 PM

this.route('edit');
this.route('details');
Copy link
Contributor Author

Choose a reason for hiding this comment

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

the config details will instead live at pki/configuration

this.route('details');
this.route('edit');
});
});
this.route('keys', function () {
this.route('index', { path: '/' });
this.route('generate');
this.route('create');
Copy link
Contributor Author

Choose a reason for hiding this comment

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

opted for create over generate to align with standard CRUD operation verbs

Copy link
Collaborator

@hashishaw hashishaw left a comment

Choose a reason for hiding this comment

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

🚀

@@ -0,0 +1,2 @@
{{! https://github.com/hashicorp/vault/blob/main/website/content/api-docs/secret/pki.mdx#import-ca-certificates-and-keys }}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Ooooh the documentation right in the route stub! I love it!

@hellobontempo hellobontempo enabled auto-merge (squash) November 18, 2022 00:37
</FormField>
{{/each}}
{{else if (eq group "Key usage")}}
<KeyUsage @model={{@model}} @group={{group}} />
<PkiKeyUsage @model={{@model}} @group={{group}} />

Check warning

Code scanning / Semgrep Scanner

Detected a unquoted template variable as an attribute. If unquoted, a malicious actor could inject custom JavaScript handlers. To fix this, add quotes around the template expression, like this: "{{ expr }}".

Detected a unquoted template variable as an attribute. If unquoted, a malicious actor could inject custom JavaScript handlers. To fix this, add quotes around the template expression, like this: "{{ expr }}".
</FormField>
{{/each}}
{{else if (eq group "Key usage")}}
<KeyUsage @model={{@model}} @group={{group}} />
<PkiKeyUsage @model={{@model}} @group={{group}} />

Check warning

Code scanning / Semgrep Scanner

Detected a unquoted template variable as an attribute. If unquoted, a malicious actor could inject custom JavaScript handlers. To fix this, add quotes around the template expression, like this: "{{ expr }}".

Detected a unquoted template variable as an attribute. If unquoted, a malicious actor could inject custom JavaScript handlers. To fix this, add quotes around the template expression, like this: "{{ expr }}".
{{else if (eq group "Key parameters")}}
<KeyParameters @model={{@model}} @group={{group}} />
<PkiKeyParameters @model={{@model}} @group={{group}} />

Check warning

Code scanning / Semgrep Scanner

Detected a unquoted template variable as an attribute. If unquoted, a malicious actor could inject custom JavaScript handlers. To fix this, add quotes around the template expression, like this: "{{ expr }}".

Detected a unquoted template variable as an attribute. If unquoted, a malicious actor could inject custom JavaScript handlers. To fix this, add quotes around the template expression, like this: "{{ expr }}".
{{else if (eq group "Key parameters")}}
<KeyParameters @model={{@model}} @group={{group}} />
<PkiKeyParameters @model={{@model}} @group={{group}} />

Check warning

Code scanning / Semgrep Scanner

Detected a unquoted template variable as an attribute. If unquoted, a malicious actor could inject custom JavaScript handlers. To fix this, add quotes around the template expression, like this: "{{ expr }}".

Detected a unquoted template variable as an attribute. If unquoted, a malicious actor could inject custom JavaScript handlers. To fix this, add quotes around the template expression, like this: "{{ expr }}".
<nav class="box menu" aria-label="generate options">
<ul class="menu-list">
<li class="action">
<LinkTo @route="configuration.create.generate-root" {{on "click" (fn this.onLinkClick D)}}>
<LinkTo @route="issuers.generate-root" {{on "click" (fn this.onLinkClick D)}}>

Check warning

Code scanning / Semgrep Scanner

Detected a unquoted template variable as an attribute. If unquoted, a malicious actor could inject custom JavaScript handlers. To fix this, add quotes around the template expression, like this: "{{ expr }}".

Detected a unquoted template variable as an attribute. If unquoted, a malicious actor could inject custom JavaScript handlers. To fix this, add quotes around the template expression, like this: "{{ expr }}".
Root
</LinkTo>
</li>
<li class="action">
<LinkTo @route="configuration.create.generate-csr" {{on "click" (fn this.onLinkClick D)}}>
<LinkTo @route="issuers.generate-intermediate" {{on "click" (fn this.onLinkClick D)}}>

Check warning

Code scanning / Semgrep Scanner

Detected a unquoted template variable as an attribute. If unquoted, a malicious actor could inject custom JavaScript handlers. To fix this, add quotes around the template expression, like this: "{{ expr }}".

Detected a unquoted template variable as an attribute. If unquoted, a malicious actor could inject custom JavaScript handlers. To fix this, add quotes around the template expression, like this: "{{ expr }}".
@hellobontempo hellobontempo merged commit 96e6672 into main Nov 18, 2022
@hellobontempo hellobontempo deleted the ui/VAULT-11575/pki-routing-part-2 branch November 18, 2022 23:05
jayant07-yb pushed a commit to jayant07-yb/hashicorp-vault-integrations that referenced this pull request Mar 15, 2023
* reroute pki config routes

* issuers routes

* refactor role routes

* add issuer/generate- routes

* update key routes

* refactor cert routes;

* template cleanup, update routes

* update component names with pki-

* update components in test files
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