Skip to content

Commit

Permalink
Implemented filter creation form
Browse files Browse the repository at this point in the history
  • Loading branch information
rmathis committed May 18, 2021
1 parent ad811a0 commit 90940ff
Show file tree
Hide file tree
Showing 23 changed files with 770 additions and 828 deletions.
1 change: 1 addition & 0 deletions ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"react": "^17.0.2",
"react-bootstrap": "^1.5.2",
"react-bootstrap-typeahead": "^5.1.4",
"react-contenteditable": "^3.3.5",
"react-dom": "^17.0.2",
"react-hook-form": "^7.5.2",
"react-infinite-scroll-component": "^6.1.0",
Expand Down
209 changes: 82 additions & 127 deletions ui/public/assets/schema/filter/entity-attributes.schema.json
Original file line number Diff line number Diff line change
@@ -1,37 +1,20 @@
{
"title": "EntityAttributes Filter",
"type": "object",
"widget": {
"id": "fieldset"
},
"properties": {
"name": {
"title": "label.filter-name",
"description": "tooltip.filter-name",
"type": "string",
"widget": {
"id": "string",
"help": "message.must-be-unique"
}
"type": "string"
},
"@type": {
"type": "string",
"widget": {
"id": "hidden"
},
"default": "EntityAttributes"
},
"resourceId": {
"type": "string",
"widget": {
"id": "hidden"
}
"type": "string"
},
"version": {
"type": "integer",
"widget": {
"id": "hidden"
}
"type": "integer"
},
"filterEnabled": {
"title": "label.enable-filter",
Expand All @@ -43,36 +26,24 @@
"title": "label.search-criteria",
"description": "tooltip.search-criteria",
"type": "object",
"widget": {
"id": "filter-target"
},
"properties": {
"entityAttributesFilterTargetType": {
"title": "",
"title": "label.filter-target-type",
"type": "string",
"default": "ENTITY",
"oneOf": [
{
"enum": [
"ENTITY"
],
"description": "value.entity-id"
},
{
"enum": [
"REGEX"
],
"description": "value.regex"
},
{
"enum": [
"CONDITION_SCRIPT"
],
"description": "value.script"
}
"enum": [
"ENTITY",
"REGEX",
"CONDITION_SCRIPT"
],
"enumNames": [
"value.entity-id",
"value.regex",
"value.script"
]
},
"value": {
"title": "label.filter-target-value",
"type": "array",
"buttons": [
{
Expand All @@ -88,139 +59,123 @@
}
}
},
"required": ["value", "entityAttributesFilterTargetType"]
"required": [
"value",
"entityAttributesFilterTargetType"
]
},
"relyingPartyOverrides": {
"type": "object",
"properties": {
"signAssertion": {
"title": "label.sign-the-assertion",
"description": "tooltip.sign-assertion",
"type": "boolean",
"default": false
"type": "boolean"
},
"dontSignResponse": {
"title": "label.dont-sign-the-response",
"description": "tooltip.dont-sign-response",
"type": "boolean",
"default": false
"type": "boolean"
},
"turnOffEncryption": {
"title": "label.turn-off-encryption-of-response",
"description": "tooltip.turn-off-encryption",
"type": "boolean",
"default": false
"type": "boolean"
},
"useSha": {
"title": "label.use-sha1-signing-algorithm",
"description": "tooltip.usa-sha-algorithm",
"type": "boolean",
"default": false
"type": "boolean"
},
"ignoreAuthenticationMethod": {
"title": "label.ignore-any-sp-requested-authentication-method",
"description": "tooltip.ignore-auth-method",
"type": "boolean",
"default": false
},
"forceAuthn": {
"title": "label.force-authn",
"description": "tooltip.force-authn",
"type": "boolean",
"default": false
"type": "boolean"
},
"omitNotBefore": {
"title": "label.omit-not-before-condition",
"type": "boolean",
"description": "tooltip.omit-not-before-condition",
"default": false
"type": "boolean"
},
"responderId": {
"title": "label.responder-id",
"description": "tooltip.responder-id",
"type": "string"
},
"nameIdFormats": {
"title": "label.nameid-format-to-send",
"placeholder": "label.nameid-format",
"description": "tooltip.nameid-format",
"type": "array",
"uniqueItems": true,
"items": {
"title": "label.nameid-format",
"type": "string",
"widget": {
"id": "datalist",
"data": [
"urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified",
"urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress",
"urn:oasis:names:tc:SAML:2.0:nameid-format:persistent",
"urn:oasis:names:tc:SAML:2.0:nameid-format:transient"
]
}
},
"default": null
"$ref": "#/definitions/nameIdFormats"
},
"authenticationMethods": {
"title": "label.authentication-methods-to-use",
"description": "tooltip.authentication-methods-to-use",
"type": "array",
"placeholder": "label.authentication-method",
"uniqueItems": true,
"items": {
"type": "string",
"title": "label.authentication-method",
"widget": {
"id": "datalist",
"data": [
"https://refeds.org/profile/mfa",
"urn:oasis:names:tc:SAML:2.0:ac:classes:TimeSyncToken",
"urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport"
]
}
},
"default": null
"$ref": "#/definitions/authenticationMethods"
},
"forceAuthn": {
"title": "label.force-authn",
"description": "tooltip.force-authn",
"type": "boolean",
"default": false
}
}
},
"attributeRelease": {
"title": "label.attribute-release",
"type": "array",
"description": "Attribute release table - select the attributes you want to release (default unchecked)",
"widget": {
"id": "checklist",
"dataUrl": "/customAttributes"
},
"uniqueItems": true,
"items": {
"type": "string"
"type": "string",
"enum": [
"eduPersonPrincipalName",
"uid",
"mail",
"surname",
"givenName",
"eduPersonAffiliation",
"eduPersonScopedAffiliation",
"eduPersonPrimaryAffiliation",
"eduPersonEntitlement",
"eduPersonAssurance",
"eduPersonUniqueId",
"employeeNumber"
]
}
}
},
"required": [
"name"
],
"fieldsets": [
{
"type": "group-lg",
"fields": [
"name",
"@type",
"resourceId",
"version",
"entityAttributesFilterTarget"
]
},
{
"type": "group",
"fields": [
"filterEnabled",
"relyingPartyOverrides"
]
"definitions": {
"nameIdFormats": {
"title": "label.nameid-format-to-send",
"description": "tooltip.nameid-format",
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"minLength": 1,
"maxLength": 255,
"examples": [
"urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified",
"urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress",
"urn:oasis:names:tc:SAML:2.0:nameid-format:persistent",
"urn:oasis:names:tc:SAML:2.0:nameid-format:transient"
]
}
},
{
"type": "group",
"fields": [
"attributeRelease"
]
"authenticationMethods": {
"title": "label.authentication-methods-to-use",
"description": "tooltip.authentication-methods-to-use",
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"minLength": 1,
"maxLength": 255,
"examples": [
"https://refeds.org/profile/mfa",
"urn:oasis:names:tc:SAML:2.0:ac:classes:TimeSyncToken",
"urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport"
]
}
}
]
}
}
53 changes: 10 additions & 43 deletions ui/public/assets/schema/filter/nameid.schema.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,5 @@
{
"type": "object",
"fieldsets": [
{
"type": "group-lg",
"fields": [
"name",
"nameIdFormatFilterTarget",
"filterEnabled",
"@type",
"resourceId",
"version",
"removeExistingFormats"
]
},
{
"type": "group",
"fields": [
"formats"
]
}
],
"required": [
"name"
],
Expand All @@ -43,37 +23,24 @@
"title": "label.search-criteria",
"description": "tooltip.search-criteria",
"type": "object",
"widget": {
"id": "filter-target",
"target": "nameIdFormatFilterTargetType"
},
"properties": {
"nameIdFormatFilterTargetType": {
"title": "",
"type": "string",
"default": "ENTITY",
"oneOf": [
{
"enum": [
"ENTITY"
],
"description": "value.entity-id"
},
{
"enum": [
"REGEX"
],
"description": "value.regex"
},
{
"enum": [
"CONDITION_SCRIPT"
],
"description": "value.script"
}
"enum": [
"ENTITY",
"REGEX",
"CONDITION_SCRIPT"
],
"enumNames": [
"value.entity-id",
"value.regex",
"value.script"
]
},
"value": {
"title": "label.filter-target-value",
"type": "array",
"buttons": [
{
Expand Down
Loading

0 comments on commit 90940ff

Please sign in to comment.