Skip to content

Commit

Permalink
chore: update schema form
Browse files Browse the repository at this point in the history
  • Loading branch information
leleueri committed Jul 5, 2023
1 parent 1cccabf commit 852d78f
Showing 1 changed file with 41 additions and 13 deletions.
54 changes: 41 additions & 13 deletions src/main/resources/schemas/schema-form.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"type" : "object",
"id" : "urn:jsonschema:io:gravitee:policy:generatejwt:configuration:GenerateJwtPolicyConfiguration",
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"additionalProperties": false,
"properties" : {
"signature": {
"title": "Signature",
Expand All @@ -21,6 +22,14 @@
"HMAC_HS384": "HS384 - HMAC with SHA-384, requires 384+ bit secret",
"HMAC_HS512": "HS512 - HMAC with SHA-512, requires 512+ bit secret"
}
},
"gioConfig": {
"enumLabelMap": {
"RSA_RS256": "RS256 - RSA signature with SHA-256",
"HMAC_HS256": "HS256 - HMAC with SHA-256, requires 256+ bit secret",
"HMAC_HS384": "HS384 - HMAC with SHA-384, requires 384+ bit secret",
"HMAC_HS512": "HS512 - HMAC with SHA-512, requires 512+ bit secret"
}
}
},
"keyResolver": {
Expand All @@ -42,31 +51,39 @@
"JKS": "The content of the private key is provided by reading a JKS file from filesystem (only for RS algorithms)",
"PKCS12": "The content of the private key is provided by reading a PKCS12 file from filesystem (only for RS algorithms)"
}
},
"gioConfig": {
"enumLabelMap": {
"INLINE": "The content of the private key / secret key is provided inline",
"PEM": "The content of the private key is provided by reading a PEM file from filesystem (only for RS algorithms)",
"JKS": "The content of the private key is provided by reading a JKS file from filesystem (only for RS algorithms)",
"PKCS12": "The content of the private key is provided by reading a PKCS12 file from filesystem (only for RS algorithms)"
}
}
},
"alias" : {
"type" : "string",
"title": "Key alias",
"description": "Alias used to access a keystore entry (only for JKS and PKCS#12)"
"description": "Alias used to access a keystore entry. (only for JKS and PKCS#12)"
},
"storepass" : {
"type" : "string",
"title": "Store password",
"description": "Pass used to access the key store (only for JKS and PKCS#12)"
"description": "Pass used to access the key store. (only for JKS and PKCS#12)"
},
"keypass" : {
"type" : "string",
"title": "Key password",
"description": "Pass used to access the particular key pair's private key (only for JKS)"
"description": "Pass used to access the particular key pair's private key. (only for JKS)"
},
"kid" : {
"type" : "string",
"title": "Key ID",
"description": "Specifies the key ID (kid) to include in the JWT header"
"description": "Specifies the key ID (kid) to include in the JWT header."
},
"x509CertificateChain": {
"title": "Certificate chain",
"description": "Whether a certificate chain should be added as an X5C attribute (only for RS256, JKS and PKCS#12)",
"description": "Whether a certificate chain should be added as an X5C attribute. (only for RS256, JKS and PKCS#12)",
"type" : "string",
"default": "NONE",
"enum" : [
Expand All @@ -79,6 +96,12 @@
"NONE": "Do not add a certificate chain",
"X5C": "Add a certificate chain as an X5C attribute"
}
},
"gioConfig": {
"enumLabelMap": {
"NONE": "Do not add a certificate chain",
"X5C": "Add a certificate chain as an X5C attribute"
}
}
},
"id" : {
Expand All @@ -92,15 +115,15 @@
"audiences" : {
"type" : "array",
"title": "Audiences",
"description": "Claim identifies the recipients that the JWT is intended for. Supports EL.",
"description": "Claim identifies the recipients that the JWT is intended for. (Supports EL)",
"items" : {
"type" : "string"
}
},
"issuer" : {
"type" : "string",
"title": "Issuer",
"description": "Claim that identifies the issuer of the JWT. Supports EL.",
"description": "Claim that identifies the issuer of the JWT. (Supports EL)",
"default": "urn://gravitee-api-gw",
"x-schema-form": {
"expression-language": true
Expand All @@ -122,15 +145,15 @@
"subject" : {
"type" : "string",
"title": "Subject",
"description": "Claim identifies or makes a statement about the subject of the JWT. Supports EL.",
"description": "Claim identifies or makes a statement about the subject of the JWT. (Supports EL)",
"x-schema-form": {
"expression-language": true
}
},
"content" : {
"type" : "string",
"title": "Private key / Secret key / key store path",
"description": "Specifies a PEM-encoded private key used to sign the JWT or the secret key used to sign tokens with an HMAC algorithm, or the path to your key store",
"description": "Specifies a PEM-encoded private key used to sign the JWT or the secret key used to sign tokens with an HMAC algorithm, or the path to your key store.",
"x-schema-form": {
"type": "codemirror",
"codemirrorOptions": {
Expand All @@ -139,16 +162,21 @@
"lineNumbers": true,
"allowDropFileTypes": true
}
},
"format": "gio-code-editor",
"gioConfig": {
"monacoEditorConfig": {
"language": "json"
}
}
},
"customClaims" : {
"type" : "array",
"title": "Custom claims",
"description": "Specify additional claim name/value pair(s) in the payload of the JWT",
"description": "Specify additional claim name/value pair(s) in the payload of the JWT.",
"items" : {
"type" : "object",
"title": "Claim",
"id" : "urn:jsonschema:io:gravitee:policy:generatejwt:model:Claim",
"properties" : {
"name" : {
"type" : "string",
Expand Down

0 comments on commit 852d78f

Please sign in to comment.