Skip to content

Commit

Permalink
fix(*): use plain text input for encrypted fields in forms (#1038)
Browse files Browse the repository at this point in the history
  • Loading branch information
Leopoldthecoder authored Dec 27, 2023
1 parent 785c9f1 commit 38bbb9c
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions packages/core/forms/src/forms/schemas/OIDCCommon.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
export default {
fields: [{
inputType: 'password',
inputType: 'text',
label: 'Config.Client Id',
model: 'config-client_id',
type: 'input',
}, {
inputType: 'password',
inputType: 'text',
label: 'Config.Client Secret',
model: 'config-client_secret',
type: 'input',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ const buildFormSchema = (parentKey: string, response: Record<string, any>, initi
}
initialFormSchema[field].inputType = scheme.type === 'array' || scheme.type === 'string'
? (scheme.encrypted ? 'password' : 'text')
? 'text'
: scheme.type
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export const basicAuthSchema: BasicAuthFieldSchema = {

{
password: {
inputType: 'password',
inputType: 'text',
},
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const hmacAuthSchema: HmacAuthFieldSchema = {
},
{
secret: {
inputType: 'password',
inputType: 'text',
submitWhenNull: false,
hint: `The secret to use in the HMAC Signature verification. Note that
if this parameter isn’t provided, Kong will generate a value for you and
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const jwtSecretSchema: JwtSecretFieldSchema = {
},
{
secret: {
inputType: 'password',
inputType: 'text',
hint: `If algorithm is HMAC, the secret used to sign JWTs for
this credential. If left out, will be auto-generated.`,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
submitWhenNull: false,
hint: `You can optionally set your own unique key to authenticate the
client. If missing, it will be generated for you.`,
inputType: 'password',
inputType: 'text',
encrypted: true,
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default {
submitWhenNull: false,
hint: `You can optionally set your own unique client_id. If missing, it
will be generated for you.`,
inputType: 'password',
inputType: 'text',
encrypted: true,
},
},
Expand All @@ -18,7 +18,7 @@ export default {
submitWhenNull: false,
hint: `You can optionally set your own unique client_secret. If missing,
it will be generated for you.`,
inputType: 'password',
inputType: 'text',
encrypted: true,
},
},
Expand Down

0 comments on commit 38bbb9c

Please sign in to comment.