Skip to content

Commit

Permalink
Added policy schema
Browse files Browse the repository at this point in the history
  • Loading branch information
oharsta committed Mar 8, 2024
1 parent e4e0d61 commit f7c9a0f
Show file tree
Hide file tree
Showing 5 changed files with 224 additions and 2 deletions.
1 change: 1 addition & 0 deletions roles/manage-server/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@ manage_tabs_enabled:
- saml20_sp
- oidc10_rp
- oauth20_rs
- policy
- single_tenant_template
- provisioning
18 changes: 18 additions & 0 deletions roles/manage-server/files/metadata_templates/policy.template.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"metaDataFields": {},
"name": "",
"entityid": "",
"description": "",
"serviceProviderIds": [],
"identityProviderIds": [],
"attributes": [],
"loas": [],
"denyAdvice": "",
"denyRule": false,
"allAttributesMustMatch": false,
"userDisplayName": "",
"authenticatingAuthorityName": "",
"denyAdviceNl": "",
"active": true,
"type": "reg"
}
2 changes: 1 addition & 1 deletion roles/manage-server/templates/application.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ spring:
mongodb:
uri: mongodb://{{ manage.mongo_user }}:{{ manage.mongo_password }}@{% for host in groups['mongo_servers'] %}{{ hostvars[host]['inventory_hostname'] }}:{{ manage.mongo_port }}{% if not loop.last %},{% endif %}{% endfor %}/{{ manage.mongo_database }}?ssl=true
datasource:
url: jdbc:mysql://{{ pdp.db_host }}/{{ pdp.db_name }}
url: jdbc:mysql://{{ pdp.db_host }}/{{ pdp.db_name }}?permitMysqlScheme
username: {{ pdp.db_user }}
password: {{ pdp.db_password }}
driverClassName: org.mariadb.jdbc.Driver
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,203 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "policy",
"order": 6,
"type": "object",
"properties": {
"eid": {
"type": "number"
},
"entityid": {
"type": "string",
"minLength": 1
},
"policyId": {
"type": "string",
"minLength": 1
},
"name": {
"type": "string",
"minLength": 1
},
"description": {
"type": "string",
"minLength": 1
},
"type": {
"type": "string",
"enum": [
"reg",
"step"
],
"default": "reg"
},
"revisionid": {
"type": "number"
},
"created": {
"type": [
"string",
"null"
]
},
"revisionnote": {
"type": "string"
},
"notes": {
"type": [
"string",
"null"
]
},
"serviceProviderIds": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
}
}
}
},
"identityProviderIds": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
}
}
}
},
"metaDataFields": {
"type": "object",
"properties": {},
"patternProperties": {},
"required": [],
"additionalProperties": false
},
"attributes": {
"type": "array",
"required": ["name", "value"],
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"value": {
"type": "string"
},
"negated": {
"type": "boolean",
"default": "false"
}
}
}
},
"loas": {
"type": "array",
"items": {
"type": "object",
"properties": {
"level": {
"type": "string"
},
"allAttributesMustMatch": {
"type": "boolean"
},
"negateCidrNotation": {
"type": "boolean"
},
"attributes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"value": {
"type": "string"
},
"negated": {
"type": "boolean"
}
}
}
},
"cidrNotations": {
"type": "array",
"items": {
"type": "object",
"properties": {
"ipAddress": {
"type": "string"
},
"prefix": {
"type": "integer"
},
"ipInfo": {
"type": "object",
"properties": {
"networkAddress": {
"type": "string"
},
"broadcastAddress": {
"type": "string"
},
"capacity": {
"type": "number"
},
"ipv4": {
"type": "boolean"
},
"prefix": {
"type": "integer"
}
}
}
}
}
}
}
}
},
"allAttributesMustMatch": {
"type": "boolean"
},
"active": {
"type": "boolean"
},
"denyRule": {
"type": "boolean"
},
"userDisplayName": {
"type": "string"
},
"authenticatingAuthorityName": {
"type": "string"
},
"denyAdvice": {
"type": [
"string",
"null"
]
},
"denyAdviceNl": {
"type": [
"string",
"null"
]
}
},
"required": [
"name",
"serviceProviderIds"
],
"additionalProperties": false,
"indexes": []
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "single_tenant_template",
"order": 6,
"order": 7,
"definitions": {
"AssertionConsumerServiceBinding": {
"type": "string",
Expand Down

0 comments on commit f7c9a0f

Please sign in to comment.