You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by rl...@apache.org on 2017/09/18 17:48:50 UTC
[2/2] ambari git commit: AMBARI-21938. Validate kerberos.json files
to ensure they meet the expected schema (rlevas)
AMBARI-21938. Validate kerberos.json files to ensure they meet the expected schema (rlevas)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/dd6cc606
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/dd6cc606
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/dd6cc606
Branch: refs/heads/trunk
Commit: dd6cc606b3918f339037a66b54f6debb8ea10586
Parents: 3cdac5f
Author: Robert Levas <rl...@hortonworks.com>
Authored: Mon Sep 18 13:48:23 2017 -0400
Committer: Robert Levas <rl...@hortonworks.com>
Committed: Mon Sep 18 13:48:23 2017 -0400
----------------------------------------------------------------------
.../resources/kerberos_descriptor_schema.json | 193 +++++++++++++++++++
1 file changed, 193 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/dd6cc606/ambari-server/src/main/resources/kerberos_descriptor_schema.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/kerberos_descriptor_schema.json b/ambari-server/src/main/resources/kerberos_descriptor_schema.json
new file mode 100644
index 0000000..34cdd49
--- /dev/null
+++ b/ambari-server/src/main/resources/kerberos_descriptor_schema.json
@@ -0,0 +1,193 @@
+{
+ "definitions": {
+ "identity": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "pattern": "^(\\.\\/)?[/a-zA-Z0-9_\\-]+$"
+ },
+ "reference": {
+ "type": "string"
+ },
+ "principal": {
+ "type": "object",
+ "properties": {
+ "value": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string",
+ "pattern": "^user|service|USER|SERVICE$"
+ },
+ "configuration": {
+ "type": "string"
+ },
+ "local_username": {
+ "type": "string"
+ }
+ }
+ },
+ "keytab": {
+ "type": "object",
+ "properties": {
+ "file": {
+ "type": "string"
+ },
+ "owner": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "access": {
+ "type": "string",
+ "pattern": "^r?|rw$"
+ }
+ }
+ },
+ "group": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "access": {
+ "type": "string",
+ "pattern": "^r?|rw$"
+ }
+ }
+ },
+ "configuration": {
+ "type": "string"
+ }
+ }
+ },
+ "when": {
+ "type": "object",
+ "properties": {
+ "contains": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ },
+ "required": [
+ "name"
+ ],
+ "additionalProperties": false
+ },
+ "identities": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/identity"
+ }
+ },
+ "configurations": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/configuration"
+ }
+ },
+ "configuration": {
+ "type": "object",
+ "properties": {
+ "type": "object",
+ "patternProperties": {
+ "^.+$": {
+ "type": "integer"
+ }
+ },
+ "additionalProperties": false
+ }
+ },
+ "service": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "identities": {
+ "$ref": "#/definitions/identities"
+ },
+ "configurations": {
+ "$ref": "#/definitions/configurations"
+ },
+ "preconfigure": {
+ "type": "boolean"
+ },
+ "components": {
+ "$ref": "#/definitions/components"
+ },
+ "auth_to_local_properties": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ },
+ "required": [
+ "name"
+ ],
+ "additionalProperties": false
+ },
+ "services": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/service"
+ }
+ },
+ "component": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "identities": {
+ "$ref": "#/definitions/identities"
+ },
+ "configurations": {
+ "$ref": "#/definitions/configurations"
+ },
+ "auth_to_local_properties": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ },
+ "required": [
+ "name"
+ ],
+ "additionalProperties": false
+ },
+ "components": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/component"
+ }
+ }
+ },
+ "type": "object",
+ "properties": {
+ "properties": {
+ "type": "object",
+ "patternProperties": {
+ "^.+$": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false
+ },
+ "identities": {
+ "$ref": "#/definitions/identities"
+ },
+ "services": {
+ "$ref": "#/definitions/services"
+ }
+ },
+ "additionalProperties": false
+}
\ No newline at end of file