From 16188b441c9646bb9cec7be3c3b77a37c9eafaaa Mon Sep 17 00:00:00 2001 From: Guillaume Cusnieux Date: Thu, 23 Mar 2023 09:12:18 +0100 Subject: [PATCH] chore: add example for whitelistClientCertificates in schema-form --- .../gv-schema-form-group/gv-schema-form-group.test.js | 2 ++ src/organisms/gv-schema-form/gv-schema-form.test.js | 2 ++ testing/resources/schemas/mixed.json | 10 ++++++++++ 3 files changed, 14 insertions(+) diff --git a/src/organisms/gv-schema-form-group/gv-schema-form-group.test.js b/src/organisms/gv-schema-form-group/gv-schema-form-group.test.js index 195ae81f..251eb649 100644 --- a/src/organisms/gv-schema-form-group/gv-schema-form-group.test.js +++ b/src/organisms/gv-schema-form-group/gv-schema-form-group.test.js @@ -57,6 +57,7 @@ describe('S C H E M A F O R M G R O U P', () => { 'readonly', 'writeonly', 'whitelist', + 'whitelistClientCertificates', ]; const checkControl = (id, attributes = []) => { @@ -100,6 +101,7 @@ describe('S C H E M A F O R M G R O U P', () => { checkControl('select'); checkControl('multiselect'); checkControl('whitelist'); + checkControl('whitelistClientCertificates'); }); test('should create element with valid value', async () => { diff --git a/src/organisms/gv-schema-form/gv-schema-form.test.js b/src/organisms/gv-schema-form/gv-schema-form.test.js index e66c5d50..e143e78f 100644 --- a/src/organisms/gv-schema-form/gv-schema-form.test.js +++ b/src/organisms/gv-schema-form/gv-schema-form.test.js @@ -57,6 +57,7 @@ describe('S C H E M A F O R M', () => { 'readonly', 'writeonly', 'whitelist', + 'whitelistClientCertificates', ]; const checkControl = (id, attributes = []) => { @@ -100,6 +101,7 @@ describe('S C H E M A F O R M', () => { checkControl('select'); checkControl('multiselect'); checkControl('whitelist'); + checkControl('whitelistClientCertificates'); }); test('should create element with valid values', async () => { diff --git a/testing/resources/schemas/mixed.json b/testing/resources/schemas/mixed.json index eca11793..4d5b0ff9 100644 --- a/testing/resources/schemas/mixed.json +++ b/testing/resources/schemas/mixed.json @@ -218,6 +218,16 @@ }, "required": ["pattern"] } + }, + "whitelistClientCertificates": { + "title": "Allowed client certificates (requires client authentication)", + "type": "array", + "items": { + "type": "string", + "pattern": "^(?: *[A-Z]+ *= *(?:\\w|\\*|\\?| )+,?)*$", + "description": "Name of client (X.500 principal). Can be expressed with an Ant pattern. For example: CN=localhost,O=GraviteeSource*,C=??", + "title": "Distinguish Name" + } } }, "required": ["multiselect", "timeToLiveSeconds"],