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

Backport of UI: Changes jwks_ca_pem param to a 'file' edit type into release/1.15.x #24701

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions changelog/24697.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
ui: Fixes input for jwks_ca_pem when configuring a JWT auth method
```
30 changes: 29 additions & 1 deletion ui/app/models/auth-config/jwt.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,31 @@ export default AuthConfig.extend({
oidcClientSecret: attr('string', {
label: 'OIDC client secret',
}),

oidcDiscoveryCaPem: attr('string', {
label: 'OIDC discovery CA PEM',
editType: 'file',
helpText:
'The CA certificate or chain of certificates, in PEM format, to use to validate connections to the OIDC Discovery URL. If not set, system certificates are used',
}),

jwksCaPem: attr('string', {
label: 'JWKS CA PEM',
editType: 'file',
}),

jwksUrl: attr('string', {
label: 'JWKS URL',
}),

oidcResponseMode: attr('string', {
label: 'OIDC response mode',
}),

oidcResponseTypes: attr('string', {
label: 'OIDC response types',
}),

jwtValidationPubkeys: attr({
label: 'JWT validation public keys',
editType: 'stringArray',
Expand All @@ -38,14 +57,23 @@ export default AuthConfig.extend({
jwtSupportedAlgs: attr({
label: 'JWT supported algorithms',
}),

boundIssuer: attr('string', {
helpText: 'The value against which to match the iss claim in a JWT',
}),

fieldGroups: computed('constructor.modelName', 'newFields', function () {
const type = this.constructor.modelName.split('/')[1].toUpperCase();
let groups = [
{
default: ['oidcDiscoveryUrl', 'defaultRole'],
default: [
'oidcDiscoveryUrl',
'defaultRole',
'jwksCaPem',
'jwksUrl',
'oidcResponseMode',
'oidcResponseTypes',
],
},
{
[`${type} Options`]: [
Expand Down
Loading