Skip to content

Commit

Permalink
Init commit
Browse files Browse the repository at this point in the history
  • Loading branch information
johnksv committed Jan 15, 2024
0 parents commit 5012f13
Show file tree
Hide file tree
Showing 8 changed files with 288 additions and 0 deletions.
9 changes: 9 additions & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Docs for CODEOWNERS file:
# https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners

# These owners will be the default owners for everything in
# the repo. Unless a later match takes precedence,
# @statisticsnorway/dapla-skyinfra-developers will be requested for
# review when someone opens a pull request.

* @statisticsnorway/dapla-platform-developers
Empty file added README.md
Empty file.
Empty file.
51 changes: 51 additions & 0 deletions src/custom-metadata.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://dapla.ssb.no/1.0.0/custom-team-metadata.schema.json",
"title": "CustomMetadata",
"description": "Custom metadata fields that the team manages",
"examples": [
{
"version": "1.0.0",
"kind": "CustomMetadata",
"metadata": {
"name": "my-name"
},
"spec": {
"my-field": "123",
"some-other-field": "123"
}
}
],
"type": "object",
"properties": {
"version": {
"description": "The version of this specification",
"type": "string",
"pattern": "^\\d\\.\\d\\.\\d(-(alpha|beta|rc)\\d*)?$"
},
"kind": {
"description": "Which kind of metadata are being described",
"type": "string",
"enum": [
"CustomMetadata"
]
},
"metadata": {
"$ref": "https://dapla.ssb.no/1.0.0/metadata-field.schema.json"
},
"spec": {
"description": "Custom fields/metadata for the team. All keys must be lowercase (a-z), may contain _",
"type": "object",
"propertyNames": {
"pattern": "^[a-z_]*$"
},
"additionalProperties": true
}
},
"required": [
"version",
"kind",
"metadata",
"spec"
]
}
31 changes: 31 additions & 0 deletions src/metadata-field.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://dapla.ssb.no/1.0.0/metadata-field.schema.json",
"description": "The metadata fields common to all kinds/entities",
"examples": [
{
"team_name": "dapla-platform",
"visibility": "PUBLIC",
"other_metadata_field": "foo"
}
],
"required": [
"team_name"
],
"type": "object",
"properties": {
"team_name": {
"description": "Name of this resource",
"type": "string",
"minLength": 1
},
"visibility": {
"description": "Whenever the metadata in this manifest is considered to be exposed in e.g. a portal. Will default to public if not specified",
"type": "string",
"enum": [
"PRIVATE",
"PUBLIC"
]
}
}
}
74 changes: 74 additions & 0 deletions src/metadata.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
version: 1.0.0
kind: TeamMetadata
metadata:
team_name: "{{cookiecutter.team_name}}"
content_name: some-name
# TODO: discuss visibility field
# visibility: PRIVATE|PUBLIC
# TODO: Should we require something in the spec, or just be free text?
spec:
data_content_types:
- OPEN
- PII
- HEALTH
- STOCK_SENSITIVE
- OTHER_SENSITIVE


---
version: 1.0.0
kind: PlatformManagedTeamMetadata
metadata:
team_name: "{{cookiecutter.team_name}}"
content_name: some-name
# visibility: PRIVATE|PUBLIC
spec:
section_code: "{{cookiecutter.department_code}}"
iac_ownership:
iac_autonomy_level: STANDALONE|PARTIAL|PLATFORM_MANAGED
sla: NONE|STANDARD



---

version: 1.0.0
kind: PlatformManagedTeamMetadata
metadata:
name: some-name
spec:
support_level: "FULL|NONE/SELF"
managed_level: "FULL|SELF"
support_agreement: "SELF"
iac_managed_by: "DAPLA_PLATFORM_TEAM|SELF_MANGED"
iac_responsibility: ""
autonomy: "TEAM|FULL|SELF_MANGED / DAPLA_PLATFORM_TEAM|MINIMAL|NONE"
autonomy-level: "LOW|MEDIUM|HIGH"
self-service-level: "LOW|MEDIUM|HIGH"

iac:
managed_by: "DAPLA_PLATFORM_TEAM|SELF_MANGED"
autonomy_level: ""
responsibility: ""

# Seksjonsledere vil ha kobling til statistikkbanken/registeret: Hvilke statistikker publiserer teamet
# Formål for teamet (test eller ikke)
datatypes:
- PII
- HEALTH_DATA
- STOCK_DATA
- OTHER_SENSITIVE
pii_agreements:
- Link to agreement in websak+?
PII_level: "" #basert på begrep introudsert i datatilstand, feks helsedata mer sensitivt enn annet
source_data:
- name: freg
datatypes:
- HEALTH_DATA
pii_agreements:
- <link to websak>
statistical_products:
- name: mitt navn
statistikkbanken: <link to statistikkbanken/registeret>
datatypes:
- STOCK_DATA
59 changes: 59 additions & 0 deletions src/platform-managed-metadata.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://dapla.ssb.no/1.0.0/platform-manged-team-metadata.schema.json",
"title": "PlatformManagedTeamMetadata",
"description": "Metadata that the platform team manages on behalf of the team",
"examples": [
{
"version": "1.0.0",
"kind": "PlatformManagedTeamMetadata",
"metadata": {
"name": "my-name"
},
"spec": {
"department_code": "123"
}
}
],
"type": "object",
"properties": {
"version": {
"description": "The version of this specification",
"type": "string",
"pattern": "^\\d\\.\\d\\.\\d(-(alpha|beta|rc)\\d*)?$"
},
"kind": {
"description": "Which kind of metadata are being described",
"type": "string",
"enum": [
"PlatformManagedMetadata"
]
},
"metadata": {
"$ref": "/1.0.0/metadata-field.schema.json"
},
"spec": {
"description": "The specification of the concrete metadata for the team. All keys must be lowercase (a-z), may contain _",
"type": "object",
"propertyNames": {
"pattern": "^[a-z_]*$"
},
"additionalProperties": false,
"required": [
"section_code"
],
"properties": {
"section_code": {
"pattern": "[0-9]{3}",
"description": "The code of the section this teams belong to"
}
}
}
},
"required": [
"version",
"kind",
"metadata",
"spec"
]
}
64 changes: 64 additions & 0 deletions src/team-metadata.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://dapla.ssb.no/1.0.0/team-metadata.schema.json",
"title": "TeamMetadata",
"description": "Predefined metadata fields that the team manages",
"examples": [
{
"version": "1.0.0",
"kind": "TeamMetadata",
"metadata": {
"name": "my-name"
},
"spec": {
"some_key": "123"
}
}
],
"type": "object",
"properties": {
"version": {
"description": "The version of this specification",
"type": "string",
"pattern": "^\\d\\.\\d\\.\\d(-(alpha|beta|rc)\\d*)?$"
},
"kind": {
"description": "Which kind of metadata are being described",
"type": "string",
"enum": [
"TeamMetadata"
]
},
"metadata": {
"$ref": "https://dapla.ssb.no/1.0.0/metadata-field.schema.json"
},
"spec": {
"description": "The specification of the concrete metadata for the team. All keys must be lowercase (a-z), may contain _",
"type": "object",
"propertyNames": {
"pattern": "^[a-z_]*$"
},
"additionalProperties": false,
"required": ["data_content_types"],
"properties": {
"data_content_types": {
"type": "array",
"enum":[
"OPEN",
"PII",
"HEALTH",
"STOCK_SENSITIVE",
"OTHER_SENSITIVE"
],
"description": "WIP, which data content this team handles"
}
}
}
},
"required": [
"version",
"kind",
"metadata",
"spec"
]
}

0 comments on commit 5012f13

Please sign in to comment.