Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision

Target

Select target project
  • fair-data-austria-db-repository/fda-services
1 result
Select Git revision
Show changes
Showing
with 438 additions and 871 deletions
#!/bin/bash
# needed for MariaDB Connector/C
apt update && apt install -y curl gcc libmariadb3 libmariadb-dev
python3 -m venv ./dbrepo-analyse-service/venv
source ./dbrepo-analyse-service/venv/bin/activate
PIPENV_PIPFILE=./dbrepo-analyse-service/Pipfile pipenv install --dev
\ No newline at end of file
File deleted
File deleted
File deleted
File deleted
File added
File added
#!/bin/bash
source ./dbrepo-analyse-service/venv/bin/activate
cd ./dbrepo-analyse-service/ && coverage run -m pytest test/test_determine_dt.py test/test_determine_pk.py test/test_s3_client.py --junitxml=report.xml && coverage html --omit="test/*" && coverage report --omit="test/*" > ./coverage.txt
\ No newline at end of file
......@@ -117,19 +117,6 @@ class S3ClientTest(unittest.TestCase):
else:
self.fail('FileNotFoundError not raised')
# @Test
def test_bucket_exists_notExists_fails(self):
# test
try:
S3Client().bucket_exists_or_exit("idnonotexist")
except FileNotFoundError:
pass
except Exception:
self.fail('unexpected exception raised')
else:
self.fail('FileNotFoundError not raised')
if __name__ == '__main__':
unittest.main()
......@@ -35,16 +35,16 @@
"duplicateEmailsAllowed" : false,
"resetPasswordAllowed" : false,
"editUsernameAllowed" : false,
"bruteForceProtected" : false,
"bruteForceProtected" : true,
"permanentLockout" : false,
"maxTemporaryLockouts" : 0,
"bruteForceStrategy" : "MULTIPLE",
"maxFailureWaitSeconds" : 900,
"minimumQuickLoginWaitSeconds" : 60,
"waitIncrementSeconds" : 60,
"quickLoginCheckMilliSeconds" : 1000,
"maxDeltaTimeSeconds" : 43200,
"failureFactor" : 30,
"quickLoginCheckMilliSeconds" : 1,
"maxDeltaTimeSeconds" : 1036800,
"failureFactor" : 10,
"roles" : {
"realm" : [ {
"id" : "48f38342-1e3f-427a-995d-c436eaee65cb",
......@@ -68,55 +68,6 @@
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "7ee1c424-11b0-46a9-b0ed-725e9b7fc40c",
"name" : "default-system-roles",
"description" : "${default-system-roles}",
"composite" : true,
"composites" : {
"realm" : [ "delete-database-view", "update-semantic-unit", "export-query-data", "check-foreign-database-access", "default-data-steward-roles", "execute-query", "default-user-handling", "delete-table-data", "find-query", "list-database-views", "persist-query", "update-search-index", "delete-database-access", "view-table-history", "create-ontology", "update-ontology", "modify-user-theme", "default-system-roles", "create-semantic-concept", "default-container-handling", "create-container", "create-table", "default-broker-handling", "default-maintenance-handling", "execute-semantic-query", "uma_authorization", "table-semantic-analyse", "list-containers", "check-database-access", "escalated-query-handling", "delete-identifier", "modify-database-owner", "list-tables", "export-table-data", "create-database-access", "delete-container", "re-execute-query", "create-semantic-unit", "escalated-identifier-handling", "system", "update-table-statistic", "escalated-semantics-handling", "default-database-handling", "delete-ontology", "find-database", "find-database-view", "update-semantic-concept", "find-user", "import-database-data", "publish-identifier", "default-roles-dbrepo", "find-foreign-user", "create-database", "create-maintenance-message", "find-maintenance-message", "escalated-container-handling", "default-researcher-roles", "default-identifier-handling", "escalated-user-handling", "modify-user-information", "create-database-view", "update-maintenance-message", "delete-foreign-table", "offline_access", "modify-foreign-table-column-semantics", "delete-maintenance-message", "find-container", "insert-table-data", "modify-identifier-metadata", "modify-database-image", "escalated-broker-handling", "modify-table-column-semantics", "escalated-database-handling", "default-semantics-handling", "update-database-access", "default-query-handling", "find-table", "list-queries", "default-developer-roles", "create-identifier", "escalated-table-handling", "find-identifier", "view-table-data", "list-licenses", "default-table-handling", "list-identifiers", "create-foreign-identifier", "list-databases", "list-ontologies", "modify-database-visibility", "list-maintenance-messages", "delete-table" ]
},
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "143ba359-5fa2-451e-8296-43ecf20bb251",
"name" : "update-semantic-concept",
"description" : "${update-semantic-concept}",
"composite" : false,
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "5136d7a3-e3f0-4585-bacd-15cb8a56095c",
"name" : "escalated-container-handling",
"description" : "${escalated-container-handling}",
"composite" : true,
"composites" : {
"realm" : [ "create-container", "delete-container" ]
},
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "b0bc8649-7d84-4dd3-84f0-7f174425babe",
"name" : "list-tables",
"description" : "${list-tables}",
"composite" : false,
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "bfd85d9c-2772-4660-a8f0-cdc0cd8252b3",
"name" : "default-database-handling",
"description" : "${default-database-handling}",
"composite" : true,
"composites" : {
"realm" : [ "modify-database-image", "modify-database-owner", "update-database-access", "create-database", "list-databases", "create-database-access", "find-database", "modify-database-visibility", "import-database-data", "delete-database-access", "check-database-access" ]
},
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "74648f9a-777e-4ef9-b97b-4c5d749d862f",
"name" : "update-search-index",
......@@ -141,36 +92,6 @@
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "d89a2881-b642-4abb-b990-196e71372f6b",
"name" : "default-table-handling",
"description" : "${default-table-handling}",
"composite" : true,
"composites" : {
"realm" : [ "modify-table-column-semantics", "list-tables", "update-table-statistic", "find-table", "create-table", "delete-table", "update-table" ]
},
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "f5ea431a-9b2c-4195-bcb4-9511f38e4b44",
"name" : "create-database-view",
"description" : "${create-database-view}",
"composite" : false,
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "a5ffc20e-8b11-498c-9f3b-b5740aec24c7",
"name" : "default-semantics-handling",
"description" : "${default-semantics-handling}",
"composite" : true,
"composites" : {
"realm" : [ "create-semantic-unit", "create-semantic-concept", "execute-semantic-query", "table-semantic-analyse" ]
},
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "fe4a01f3-6590-4df6-9ade-5a9c1fae4736",
"name" : "create-semantic-unit",
......@@ -179,25 +100,6 @@
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "0e12eedf-545d-4d32-ac4d-2821dcb118b8",
"name" : "update-table-statistic",
"description" : "${update-table-statistic}",
"composite" : false,
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "e63e61a2-d852-4ad3-bfb5-92d9ceafef6a",
"name" : "escalated-user-handling",
"description" : "${escalated-user-handling}",
"composite" : true,
"composites" : {
"realm" : [ "find-user" ]
},
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "be4e1aba-e276-4241-b6ea-01dce6c52f8b",
"name" : "find-container",
......@@ -212,7 +114,7 @@
"description" : "${default-researcher-roles}",
"composite" : true,
"composites" : {
"realm" : [ "default-table-handling", "default-semantics-handling", "default-container-handling", "default-query-handling", "default-user-handling", "default-database-handling", "default-broker-handling", "default-identifier-handling", "default-view-handling" ]
"realm" : [ "default-table-handling", "default-semantics-handling", "default-container-handling", "default-query-handling", "default-user-handling", "default-database-handling", "default-broker-handling", "default-identifier-handling", "default-storage-roles", "default-view-handling" ]
},
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
......@@ -282,213 +184,490 @@
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "e9854bbb-4580-4757-b1ae-305934173249",
"name" : "create-database-access",
"description" : "${create-database-access}",
"id" : "535f1484-4514-4d24-8d97-e3f6c11a426b",
"name" : "create-container",
"description" : "${create-container}",
"composite" : false,
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "50c604c1-7c6e-43f3-9c43-2398f5eff66e",
"name" : "list-databases",
"description" : "${list-databases}",
"id" : "e1383fb7-d54c-4732-9146-93030eb2ca50",
"name" : "escalated-query-handling",
"description" : "${escalated-query-handling}",
"composite" : false,
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "d75e7938-9d5e-4cb3-8c57-18a446867d3a",
"name" : "default-view-handling",
"description" : "${default-view-handling}",
"composite" : true,
"composites" : {
"realm" : [ "delete-database-view", "update-database-view", "create-database-view", "modify-view-visibility", "find-database-view", "list-database-views" ]
},
"id" : "e4cfdc4d-2373-477b-a8df-161db99aba00",
"name" : "create-foreign-identifier",
"description" : "${create-foreign-identifier}",
"composite" : false,
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "535f1484-4514-4d24-8d97-e3f6c11a426b",
"name" : "create-container",
"description" : "${create-container}",
"id" : "be051d45-cd74-4b13-8a45-f2d3351bd995",
"name" : "table-semantic-analyse",
"description" : "${table-semantic-analyse}",
"composite" : false,
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "f4116230-8642-4bb7-bbc8-db9c5c07b558",
"name" : "create-maintenance-message",
"description" : "${create-maintenance-message}",
"id" : "272a79a7-e282-4261-8f7d-5d5d1364243a",
"name" : "update-maintenance-message",
"description" : "${update-maintenance-message}",
"composite" : false,
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "973f0999-cc70-4b28-9f43-979c470bea8e",
"name" : "default-data-steward-roles",
"description" : "${default-data-steward-roles}",
"composite" : true,
"composites" : {
"realm" : [ "escalated-identifier-handling", "default-semantics-handling", "escalated-semantics-handling", "default-user-handling" ]
},
"id" : "b05e9b2b-748d-490b-949b-e78655bf7805",
"name" : "check-foreign-database-access",
"description" : "${check-foreign-database-access}",
"composite" : false,
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "e1383fb7-d54c-4732-9146-93030eb2ca50",
"name" : "escalated-query-handling",
"description" : "${escalated-query-handling}",
"id" : "c047d521-cec3-4444-86c4-aef098489b7b",
"name" : "delete-maintenance-message",
"description" : "${delete-maintenance-message}",
"composite" : false,
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "993b5c69-9eb2-42af-ac28-b4a46c6b61f2",
"name" : "find-user",
"description" : "${find-user}",
"id" : "df20b7d1-8d30-4a99-80eb-e8195fab0e76",
"name" : "update-database-view",
"description" : "${update-database-view}",
"composite" : false,
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "e4cfdc4d-2373-477b-a8df-161db99aba00",
"name" : "create-foreign-identifier",
"description" : "${create-foreign-identifier}",
"id" : "88f82262-be80-4d18-9fb4-5529da031f33",
"name" : "system",
"description" : "${system}",
"composite" : false,
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "6a5872a5-2b51-415d-ae2d-25a6db4a35df",
"name" : "escalated-semantics-handling",
"description" : "${escalated-semantics-handling}",
"composite" : true,
"composites" : {
"realm" : [ "update-semantic-unit", "create-ontology", "update-ontology", "list-ontologies", "delete-ontology", "modify-foreign-table-column-semantics", "update-semantic-concept" ]
},
"id" : "e14ab76b-1c24-484d-ae2d-478b8457edea",
"name" : "list-licenses",
"description" : "${list-licenses}",
"composite" : false,
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "09147c48-273b-450b-8b11-7ef9b9245244",
"name" : "export-table-data",
"description" : "${export-table-data}",
"id" : "d4f29937-3ca0-41e9-9786-2b7b921b6cdd",
"name" : "modify-foreign-table-column-semantics",
"description" : "${modify-foreign-table-column-semantics}",
"composite" : false,
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "d14af590-60a8-4d75-b864-40ee0165bd7f",
"name" : "delete-database-access",
"description" : "${delete-database-access}",
"id" : "8eda9f5c-938c-4915-bed5-6a81a1de15a8",
"name" : "list-database-views",
"description" : "${list-database-views}",
"composite" : false,
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "be051d45-cd74-4b13-8a45-f2d3351bd995",
"name" : "table-semantic-analyse",
"description" : "${table-semantic-analyse}",
"id" : "abd2d9ee-ebc4-4d0a-839e-6b588a6d442a",
"name" : "default-roles-dbrepo",
"description" : "${role_default-roles}",
"composite" : false,
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "272a79a7-e282-4261-8f7d-5d5d1364243a",
"name" : "update-maintenance-message",
"description" : "${update-maintenance-message}",
"id" : "76e38f7b-99bf-4d12-8d74-1c7d8812f443",
"name" : "update-ontology",
"description" : "${update-ontology}",
"composite" : false,
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "6ae766b0-b8b4-4067-a95d-c8576bc4ac77",
"name" : "update-table",
"description" : "${update-table}",
"id" : "f392bfcb-0be5-4fad-9ce4-8ac6396f176d",
"name" : "export-query-data",
"description" : "${export-query-data}",
"composite" : false,
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "64c16bfb-2015-48ad-a23f-637ff24419cb",
"name" : "default-query-handling",
"description" : "${default-query-handling}",
"composite" : true,
"composites" : {
"realm" : [ "delete-database-view", "export-query-data", "execute-query", "delete-table-data", "export-table-data", "list-queries", "find-query", "list-database-views", "persist-query", "view-table-data", "re-execute-query", "view-table-history", "create-database-view", "find-database-view", "insert-table-data" ]
},
"id" : "47f5eee7-9821-4bf8-b434-0da1f81c3e5a",
"name" : "default-broker-handling",
"description" : "${default-broker-handling}",
"composite" : false,
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "b05e9b2b-748d-490b-949b-e78655bf7805",
"name" : "check-foreign-database-access",
"description" : "${check-foreign-database-access}",
"id" : "71874bde-64a5-4a69-8685-d8998303a80c",
"name" : "delete-table-data",
"description" : "${delete-table-data}",
"composite" : false,
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "c047d521-cec3-4444-86c4-aef098489b7b",
"name" : "delete-maintenance-message",
"description" : "${delete-maintenance-message}",
"id" : "cd0ee04c-4a5e-4035-a11b-f6a1165f7829",
"name" : "delete-container",
"description" : "${delete-container}",
"composite" : false,
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "df20b7d1-8d30-4a99-80eb-e8195fab0e76",
"name" : "update-database-view",
"description" : "${update-database-view}",
"id" : "67ee39c0-d601-4a67-a0fe-c4f0021d557e",
"name" : "list-containers",
"description" : "${list-containers}",
"composite" : false,
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "88f82262-be80-4d18-9fb4-5529da031f33",
"name" : "system",
"description" : "${system}",
"id" : "d05e7698-ddf5-4f20-9027-771afb2cc3c7",
"name" : "list-identifiers",
"description" : "${list-identifiers}",
"composite" : false,
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "e14ab76b-1c24-484d-ae2d-478b8457edea",
"name" : "list-licenses",
"description" : "${list-licenses}",
"id" : "e2cb054e-ea41-4ab0-881b-e6f576f7424e",
"name" : "create-semantic-concept",
"description" : "${create-semantic-concept}",
"composite" : false,
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "d4f29937-3ca0-41e9-9786-2b7b921b6cdd",
"name" : "modify-foreign-table-column-semantics",
"description" : "${modify-foreign-table-column-semantics}",
"id" : "feb612cc-96a6-4ed2-aaa5-01f39b25beb5",
"name" : "insert-table-data",
"description" : "${insert-table-data}",
"composite" : false,
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "8eda9f5c-938c-4915-bed5-6a81a1de15a8",
"name" : "list-database-views",
"description" : "${list-database-views}",
"id" : "a0942e33-441b-4343-9f02-4353d03f7bbb",
"name" : "find-database",
"description" : "${find-database}",
"composite" : false,
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "b372f8f7-d203-4293-b991-ad93fb505917",
"name" : "escalated-database-handling",
"description" : "${escalated-database-handling}",
"id" : "7f3652c7-3073-4566-ab63-25385495ebc3",
"name" : "modify-database-visibility",
"description" : "${modify-database-visibility}",
"composite" : false,
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "abd2d9ee-ebc4-4d0a-839e-6b588a6d442a",
"name" : "default-roles-dbrepo",
"description" : "${role_default-roles}",
"id" : "2963c2bb-b129-4224-b98f-c8eeab8e72d1",
"name" : "create-table",
"description" : "${create-table}",
"composite" : false,
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "0c487c93-448f-4a82-8b9f-ebd8a0904bf8",
"name" : "find-foreign-user",
"description" : "${find-foreign-user}",
"composite" : false,
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "cf9735a9-fb70-4cc5-b5f4-75afc4e5654b",
"name" : "modify-identifier-metadata",
"description" : "${modify-identifier-metadata}",
"composite" : false,
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "64c2b8f2-1527-4928-81ea-b2651512d028",
"name" : "delete-ontology",
"description" : "${delete-ontology}",
"composite" : false,
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "fd1cc463-3e67-49d9-81b8-2cd90c1daa9c",
"name" : "check-database-access",
"description" : "${check-database-access}",
"composite" : false,
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "a2cc60df-d280-46c5-a539-92e2aa249b4a",
"name" : "modify-user-information",
"description" : "${modify-user-information}",
"composite" : false,
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "ba1ad8f2-39aa-487d-987f-645e8a459559",
"name" : "delete-table",
"description" : "${delete-table}",
"composite" : false,
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "fe3bc45c-61c2-4ece-bcaf-d410dc7de501",
"name" : "update-database-access",
"description" : "${update-database-access}",
"composite" : false,
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "6f044bad-6651-4408-bffa-20c2d8f92eee",
"name" : "create-identifier",
"description" : "${create-identifier}",
"composite" : false,
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "be91195a-e30a-4d15-a8da-0aca0a68782f",
"name" : "escalated-table-handling",
"description" : "${escalated-table-handling}",
"composite" : true,
"composites" : {
"realm" : [ "delete-foreign-table" ]
},
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "15720c6b-027d-4d53-a0ff-0124bfab7c4c",
"name" : "re-execute-query",
"description" : "${re-execute-query}",
"composite" : false,
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "7ee1c424-11b0-46a9-b0ed-725e9b7fc40c",
"name" : "default-system-roles",
"description" : "${default-system-roles}",
"composite" : true,
"composites" : {
"realm" : [ "delete-database-view", "update-semantic-unit", "export-query-data", "check-foreign-database-access", "default-data-steward-roles", "execute-query", "default-user-handling", "delete-table-data", "find-query", "list-database-views", "persist-query", "update-search-index", "delete-database-access", "view-table-history", "create-ontology", "update-ontology", "modify-user-theme", "default-system-roles", "create-semantic-concept", "default-container-handling", "create-container", "create-table", "default-broker-handling", "default-maintenance-handling", "execute-semantic-query", "uma_authorization", "table-semantic-analyse", "list-containers", "check-database-access", "escalated-query-handling", "delete-identifier", "modify-database-owner", "list-tables", "export-table-data", "create-database-access", "delete-container", "re-execute-query", "create-semantic-unit", "escalated-identifier-handling", "system", "update-table-statistic", "escalated-semantics-handling", "default-database-handling", "delete-ontology", "find-database", "find-database-view", "update-semantic-concept", "find-user", "import-database-data", "publish-identifier", "default-roles-dbrepo", "find-foreign-user", "create-database", "create-maintenance-message", "find-maintenance-message", "escalated-container-handling", "default-researcher-roles", "default-identifier-handling", "escalated-user-handling", "modify-user-information", "create-database-view", "update-maintenance-message", "delete-foreign-table", "offline_access", "modify-foreign-table-column-semantics", "delete-maintenance-message", "find-container", "insert-table-data", "modify-identifier-metadata", "modify-database-image", "escalated-broker-handling", "modify-table-column-semantics", "escalated-database-handling", "default-semantics-handling", "update-database-access", "default-query-handling", "find-table", "list-queries", "default-developer-roles", "create-identifier", "escalated-table-handling", "find-identifier", "view-table-data", "default-storage-roles", "list-licenses", "default-table-handling", "list-identifiers", "create-foreign-identifier", "list-databases", "list-ontologies", "modify-database-visibility", "list-maintenance-messages", "delete-table" ]
},
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "143ba359-5fa2-451e-8296-43ecf20bb251",
"name" : "update-semantic-concept",
"description" : "${update-semantic-concept}",
"composite" : false,
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "5136d7a3-e3f0-4585-bacd-15cb8a56095c",
"name" : "escalated-container-handling",
"description" : "${escalated-container-handling}",
"composite" : true,
"composites" : {
"realm" : [ "create-container", "delete-container" ]
},
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "b0bc8649-7d84-4dd3-84f0-7f174425babe",
"name" : "list-tables",
"description" : "${list-tables}",
"composite" : false,
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "bfd85d9c-2772-4660-a8f0-cdc0cd8252b3",
"name" : "default-database-handling",
"description" : "${default-database-handling}",
"composite" : true,
"composites" : {
"realm" : [ "modify-database-image", "modify-database-owner", "update-database-access", "create-database", "list-databases", "create-database-access", "find-database", "modify-database-visibility", "import-database-data", "delete-database-access", "check-database-access" ]
},
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "d89a2881-b642-4abb-b990-196e71372f6b",
"name" : "default-table-handling",
"description" : "${default-table-handling}",
"composite" : true,
"composites" : {
"realm" : [ "modify-table-column-semantics", "list-tables", "update-table-statistic", "find-table", "create-table", "delete-table", "update-table" ]
},
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "f5ea431a-9b2c-4195-bcb4-9511f38e4b44",
"name" : "create-database-view",
"description" : "${create-database-view}",
"composite" : false,
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "a5ffc20e-8b11-498c-9f3b-b5740aec24c7",
"name" : "default-semantics-handling",
"description" : "${default-semantics-handling}",
"composite" : true,
"composites" : {
"realm" : [ "create-semantic-unit", "create-semantic-concept", "execute-semantic-query", "table-semantic-analyse" ]
},
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "0e12eedf-545d-4d32-ac4d-2821dcb118b8",
"name" : "update-table-statistic",
"description" : "${update-table-statistic}",
"composite" : false,
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "e63e61a2-d852-4ad3-bfb5-92d9ceafef6a",
"name" : "escalated-user-handling",
"description" : "${escalated-user-handling}",
"composite" : true,
"composites" : {
"realm" : [ "find-user" ]
},
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "e9854bbb-4580-4757-b1ae-305934173249",
"name" : "create-database-access",
"description" : "${create-database-access}",
"composite" : false,
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "50c604c1-7c6e-43f3-9c43-2398f5eff66e",
"name" : "list-databases",
"description" : "${list-databases}",
"composite" : false,
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "d75e7938-9d5e-4cb3-8c57-18a446867d3a",
"name" : "default-view-handling",
"description" : "${default-view-handling}",
"composite" : true,
"composites" : {
"realm" : [ "delete-database-view", "update-database-view", "create-database-view", "modify-view-visibility", "find-database-view", "list-database-views" ]
},
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "f4116230-8642-4bb7-bbc8-db9c5c07b558",
"name" : "create-maintenance-message",
"description" : "${create-maintenance-message}",
"composite" : false,
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "973f0999-cc70-4b28-9f43-979c470bea8e",
"name" : "default-data-steward-roles",
"description" : "${default-data-steward-roles}",
"composite" : true,
"composites" : {
"realm" : [ "escalated-identifier-handling", "default-semantics-handling", "escalated-semantics-handling", "default-user-handling", "default-storage-roles" ]
},
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "993b5c69-9eb2-42af-ac28-b4a46c6b61f2",
"name" : "find-user",
"description" : "${find-user}",
"composite" : false,
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "6a5872a5-2b51-415d-ae2d-25a6db4a35df",
"name" : "escalated-semantics-handling",
"description" : "${escalated-semantics-handling}",
"composite" : true,
"composites" : {
"realm" : [ "update-semantic-unit", "create-ontology", "update-ontology", "list-ontologies", "delete-ontology", "modify-foreign-table-column-semantics", "update-semantic-concept" ]
},
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "09147c48-273b-450b-8b11-7ef9b9245244",
"name" : "export-table-data",
"description" : "${export-table-data}",
"composite" : false,
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "d14af590-60a8-4d75-b864-40ee0165bd7f",
"name" : "delete-database-access",
"description" : "${delete-database-access}",
"composite" : false,
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "6ae766b0-b8b4-4067-a95d-c8576bc4ac77",
"name" : "update-table",
"description" : "${update-table}",
"composite" : false,
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "64c16bfb-2015-48ad-a23f-637ff24419cb",
"name" : "default-query-handling",
"description" : "${default-query-handling}",
"composite" : true,
"composites" : {
"realm" : [ "delete-database-view", "export-query-data", "execute-query", "delete-table-data", "export-table-data", "list-queries", "find-query", "list-database-views", "persist-query", "view-table-data", "re-execute-query", "view-table-history", "create-database-view", "find-database-view", "insert-table-data" ]
},
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "b372f8f7-d203-4293-b991-ad93fb505917",
"name" : "escalated-database-handling",
"description" : "${escalated-database-handling}",
"composite" : false,
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
......@@ -509,14 +688,6 @@
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "76e38f7b-99bf-4d12-8d74-1c7d8812f443",
"name" : "update-ontology",
"description" : "${update-ontology}",
"composite" : false,
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "11f7973e-d1eb-42cb-a35d-c59dfc122775",
"name" : "modify-user-theme",
......@@ -525,14 +696,6 @@
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "f392bfcb-0be5-4fad-9ce4-8ac6396f176d",
"name" : "export-query-data",
"description" : "${export-query-data}",
"composite" : false,
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "da493b7e-fb9b-43ca-82a5-e274ad2e6b39",
"name" : "find-query",
......@@ -571,22 +734,6 @@
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "47f5eee7-9821-4bf8-b434-0da1f81c3e5a",
"name" : "default-broker-handling",
"description" : "${default-broker-handling}",
"composite" : false,
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "71874bde-64a5-4a69-8685-d8998303a80c",
"name" : "delete-table-data",
"description" : "${delete-table-data}",
"composite" : false,
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "7c0306fc-3b03-4c64-87d1-9a34f2073977",
"name" : "modify-table-column-semantics",
......@@ -595,22 +742,6 @@
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "cd0ee04c-4a5e-4035-a11b-f6a1165f7829",
"name" : "delete-container",
"description" : "${delete-container}",
"composite" : false,
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "67ee39c0-d601-4a67-a0fe-c4f0021d557e",
"name" : "list-containers",
"description" : "${list-containers}",
"composite" : false,
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "795c7bb8-3502-414a-a97b-2ba1cfd6a79c",
"name" : "persist-query",
......@@ -619,45 +750,21 @@
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "d05e7698-ddf5-4f20-9027-771afb2cc3c7",
"name" : "list-identifiers",
"description" : "${list-identifiers}",
"composite" : false,
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "e4bfaf36-9a5d-43e0-9fa3-0f4ea7bad8d0",
"name" : "default-developer-roles",
"description" : "${default-developer-roles}",
"composite" : true,
"composites" : {
"realm" : [ "escalated-query-handling", "escalated-broker-handling", "default-table-handling", "escalated-database-handling", "default-container-handling", "default-query-handling", "default-user-handling", "default-database-handling", "default-maintenance-handling", "escalated-container-handling", "escalated-table-handling", "default-identifier-handling" ]
"realm" : [ "escalated-query-handling", "escalated-broker-handling", "escalated-database-handling", "default-query-handling", "default-user-handling", "escalated-container-handling", "escalated-table-handling", "default-identifier-handling", "default-storage-roles", "default-table-handling", "default-container-handling", "default-database-handling", "default-maintenance-handling" ]
},
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "e2cb054e-ea41-4ab0-881b-e6f576f7424e",
"name" : "create-semantic-concept",
"description" : "${create-semantic-concept}",
"composite" : false,
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "feb612cc-96a6-4ed2-aaa5-01f39b25beb5",
"name" : "insert-table-data",
"description" : "${insert-table-data}",
"composite" : false,
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "a0942e33-441b-4343-9f02-4353d03f7bbb",
"name" : "find-database",
"description" : "${find-database}",
"id" : "674ea174-a165-441e-a01c-6b0010354474",
"name" : "upload-file",
"description" : "${upload-file}",
"composite" : false,
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
......@@ -670,14 +777,6 @@
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "7f3652c7-3073-4566-ab63-25385495ebc3",
"name" : "modify-database-visibility",
"description" : "${modify-database-visibility}",
"composite" : false,
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "4a5df51d-f14d-41a2-ad70-6521df5a5b4f",
"name" : "offline_access",
......@@ -694,38 +793,6 @@
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "2963c2bb-b129-4224-b98f-c8eeab8e72d1",
"name" : "create-table",
"description" : "${create-table}",
"composite" : false,
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "0c487c93-448f-4a82-8b9f-ebd8a0904bf8",
"name" : "find-foreign-user",
"description" : "${find-foreign-user}",
"composite" : false,
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "cf9735a9-fb70-4cc5-b5f4-75afc4e5654b",
"name" : "modify-identifier-metadata",
"description" : "${modify-identifier-metadata}",
"composite" : false,
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "64c2b8f2-1527-4928-81ea-b2651512d028",
"name" : "delete-ontology",
"description" : "${delete-ontology}",
"composite" : false,
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "d6e38368-b40f-423b-82e4-e8aa595237c9",
"name" : "find-maintenance-message",
......@@ -734,14 +801,6 @@
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "fd1cc463-3e67-49d9-81b8-2cd90c1daa9c",
"name" : "check-database-access",
"description" : "${check-database-access}",
"composite" : false,
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "74013867-e426-46cc-ab98-2f4a9225ad1e",
"name" : "find-table",
......@@ -750,14 +809,6 @@
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "a2cc60df-d280-46c5-a539-92e2aa249b4a",
"name" : "modify-user-information",
"description" : "${modify-user-information}",
"composite" : false,
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "c367241f-b5b5-491f-84d5-07fe1bef3877",
"name" : "default-identifier-handling",
......@@ -769,14 +820,6 @@
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "ba1ad8f2-39aa-487d-987f-645e8a459559",
"name" : "delete-table",
"description" : "${delete-table}",
"composite" : false,
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "09f7bdb0-296f-46c8-a3a3-8f9254fb17e4",
"name" : "list-maintenance-messages",
......@@ -785,14 +828,6 @@
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "fe3bc45c-61c2-4ece-bcaf-d410dc7de501",
"name" : "update-database-access",
"description" : "${update-database-access}",
"composite" : false,
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "f43e86ed-76de-4ca8-9b5e-c292c9359bfe",
"name" : "escalated-broker-handling",
......@@ -817,25 +852,6 @@
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "6f044bad-6651-4408-bffa-20c2d8f92eee",
"name" : "create-identifier",
"description" : "${create-identifier}",
"composite" : false,
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "be91195a-e30a-4d15-a8da-0aca0a68782f",
"name" : "escalated-table-handling",
"description" : "${escalated-table-handling}",
"composite" : true,
"composites" : {
"realm" : [ "delete-foreign-table" ]
},
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "98bee7d6-d78c-4e7f-b6a3-3705968b248c",
"name" : "list-ontologies",
......@@ -845,10 +861,13 @@
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
}, {
"id" : "15720c6b-027d-4d53-a0ff-0124bfab7c4c",
"name" : "re-execute-query",
"description" : "${re-execute-query}",
"composite" : false,
"id" : "a4645bb5-e0b8-43a7-9a76-21ac252a0ac1",
"name" : "default-storage-roles",
"description" : "${default-storage-roles}",
"composite" : true,
"composites" : {
"realm" : [ "upload-file" ]
},
"clientRole" : false,
"containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0",
"attributes" : { }
......@@ -1172,6 +1191,7 @@
},
"defaultGroups" : [ "/researchers" ],
"requiredCredentials" : [ "password" ],
"passwordPolicy" : "length(8) and maxLength(64) and specialChars(1) and lowerCase(1) and upperCase(1) and digits(1)",
"otpPolicyType" : "totp",
"otpPolicyAlgorithm" : "HmacSHA1",
"otpPolicyInitialCounter" : 0,
......@@ -2220,34 +2240,6 @@
"consent.screen.text" : "${offlineAccessScopeConsentText}",
"display.on.consent.screen" : "true"
}
}, {
"id" : "425abf4a-2ee2-431d-aa92-e373a36fe556",
"name" : "address",
"description" : "OpenID Connect built-in scope: address",
"protocol" : "openid-connect",
"attributes" : {
"include.in.token.scope" : "true",
"consent.screen.text" : "${addressScopeConsentText}",
"display.on.consent.screen" : "true"
},
"protocolMappers" : [ {
"id" : "8d4ffe4d-1d01-4ca1-8ff4-44eacca61b30",
"name" : "address",
"protocol" : "openid-connect",
"protocolMapper" : "oidc-address-mapper",
"consentRequired" : false,
"config" : {
"user.attribute.formatted" : "formatted",
"user.attribute.country" : "country",
"user.attribute.postal_code" : "postal_code",
"userinfo.token.claim" : "true",
"user.attribute.street" : "street",
"id.token.claim" : "true",
"user.attribute.region" : "region",
"access.token.claim" : "true",
"user.attribute.locality" : "locality"
}
} ]
}, {
"id" : "c96f0b73-ea79-4b46-93ef-d1092297f855",
"name" : "rabbitmq.read:*/*",
......@@ -2294,6 +2286,34 @@
"jsonType.label" : "long"
}
} ]
}, {
"id" : "425abf4a-2ee2-431d-aa92-e373a36fe556",
"name" : "address",
"description" : "OpenID Connect built-in scope: address",
"protocol" : "openid-connect",
"attributes" : {
"include.in.token.scope" : "true",
"consent.screen.text" : "${addressScopeConsentText}",
"display.on.consent.screen" : "true"
},
"protocolMappers" : [ {
"id" : "8d4ffe4d-1d01-4ca1-8ff4-44eacca61b30",
"name" : "address",
"protocol" : "openid-connect",
"protocolMapper" : "oidc-address-mapper",
"consentRequired" : false,
"config" : {
"user.attribute.formatted" : "formatted",
"user.attribute.country" : "country",
"user.attribute.postal_code" : "postal_code",
"userinfo.token.claim" : "true",
"user.attribute.street" : "street",
"id.token.claim" : "true",
"user.attribute.region" : "region",
"access.token.claim" : "true",
"user.attribute.locality" : "locality"
}
} ]
}, {
"id" : "37f61543-dad7-4a82-8e10-77acdd1eefdc",
"name" : "roles",
......@@ -2409,7 +2429,7 @@
"subType" : "anonymous",
"subComponents" : { },
"config" : {
"allowed-protocol-mapper-types" : [ "saml-role-list-mapper", "saml-user-property-mapper", "oidc-address-mapper", "oidc-usermodel-property-mapper", "oidc-full-name-mapper", "saml-user-attribute-mapper", "oidc-usermodel-attribute-mapper", "oidc-sha256-pairwise-sub-mapper" ]
"allowed-protocol-mapper-types" : [ "oidc-sha256-pairwise-sub-mapper", "oidc-address-mapper", "oidc-usermodel-attribute-mapper", "oidc-full-name-mapper", "saml-role-list-mapper", "saml-user-attribute-mapper", "oidc-usermodel-property-mapper", "saml-user-property-mapper" ]
}
}, {
"id" : "1849e52a-b8c9-44a8-af3d-ee19376a1ed1",
......@@ -2435,7 +2455,7 @@
"subType" : "authenticated",
"subComponents" : { },
"config" : {
"allowed-protocol-mapper-types" : [ "oidc-full-name-mapper", "saml-role-list-mapper", "saml-user-attribute-mapper", "oidc-usermodel-attribute-mapper", "oidc-sha256-pairwise-sub-mapper", "oidc-usermodel-property-mapper", "saml-user-property-mapper", "oidc-address-mapper" ]
"allowed-protocol-mapper-types" : [ "oidc-full-name-mapper", "oidc-sha256-pairwise-sub-mapper", "saml-user-property-mapper", "oidc-address-mapper", "oidc-usermodel-property-mapper", "saml-role-list-mapper", "oidc-usermodel-attribute-mapper", "saml-user-attribute-mapper" ]
}
} ],
"org.keycloak.userprofile.UserProfileProvider" : [ {
......@@ -2459,8 +2479,8 @@
"config" : {
"ldap.attribute" : [ "createTimestamp" ],
"is.mandatory.in.ldap" : [ "false" ],
"read.only" : [ "true" ],
"always.read.value.from.ldap" : [ "true" ],
"read.only" : [ "true" ],
"user.model.attribute" : [ "createTimestamp" ]
}
}, {
......@@ -2471,8 +2491,8 @@
"config" : {
"ldap.attribute" : [ "sn" ],
"is.mandatory.in.ldap" : [ "true" ],
"always.read.value.from.ldap" : [ "true" ],
"read.only" : [ "false" ],
"always.read.value.from.ldap" : [ "true" ],
"user.model.attribute" : [ "lastName" ]
}
}, {
......@@ -2509,13 +2529,13 @@
"membership.attribute.type" : [ "DN" ],
"user.roles.retrieve.strategy" : [ "LOAD_GROUPS_BY_MEMBER_ATTRIBUTE" ],
"group.name.ldap.attribute" : [ "cn" ],
"preserve.group.inheritance" : [ "false" ],
"membership.ldap.attribute" : [ "member" ],
"ignore.missing.groups" : [ "false" ],
"preserve.group.inheritance" : [ "false" ],
"membership.user.ldap.attribute" : [ "uid" ],
"groups.dn" : [ "ou=users,dc=dbrepo,dc=at" ],
"group.object.classes" : [ "groupOfNames" ],
"memberof.ldap.attribute" : [ "memberOf" ],
"group.object.classes" : [ "groupOfNames" ],
"groups.dn" : [ "ou=users,dc=dbrepo,dc=at" ],
"drop.non.existing.groups.during.sync" : [ "false" ],
"groups.path" : [ "/" ]
}
......@@ -2527,8 +2547,8 @@
"config" : {
"ldap.attribute" : [ "modifyTimestamp" ],
"is.mandatory.in.ldap" : [ "false" ],
"read.only" : [ "true" ],
"always.read.value.from.ldap" : [ "true" ],
"read.only" : [ "true" ],
"user.model.attribute" : [ "modifyTimestamp" ]
}
}, {
......@@ -2538,8 +2558,8 @@
"subComponents" : { },
"config" : {
"ldap.attribute" : [ "uid" ],
"is.mandatory.in.ldap" : [ "true" ],
"attribute.force.default" : [ "false" ],
"is.mandatory.in.ldap" : [ "true" ],
"is.binary.attribute" : [ "false" ],
"always.read.value.from.ldap" : [ "false" ],
"read.only" : [ "false" ],
......@@ -2548,19 +2568,19 @@
} ]
},
"config" : {
"fullSyncPeriod" : [ "-1" ],
"pagination" : [ "false" ],
"fullSyncPeriod" : [ "-1" ],
"startTls" : [ "false" ],
"usersDn" : [ "ou=users,dc=dbrepo,dc=at" ],
"connectionPooling" : [ "true" ],
"usersDn" : [ "ou=users,dc=dbrepo,dc=at" ],
"cachePolicy" : [ "DEFAULT" ],
"useKerberosForPasswordAuthentication" : [ "false" ],
"importEnabled" : [ "true" ],
"enabled" : [ "true" ],
"bindCredential" : [ "admin" ],
"changedSyncPeriod" : [ "-1" ],
"usernameLDAPAttribute" : [ "uid" ],
"bindDn" : [ "cn=admin,dc=dbrepo,dc=at" ],
"usernameLDAPAttribute" : [ "uid" ],
"changedSyncPeriod" : [ "-1" ],
"lastSync" : [ "1719252666" ],
"vendor" : [ "other" ],
"uuidLDAPAttribute" : [ "entryUUID" ],
......
[report]
omit =
# omit tests
./tests/*
# omit ext lib
./omlib/*
exclude_lines =
if __name__ == .__main__.:
\ No newline at end of file
[html]
directory = htmlcov
No preview for this file type
File deleted
FROM docker.io/bitnami/grafana:10.4.9-debian-12-r0 AS runtime
FROM docker.io/bitnami/grafana:11.5.1 AS runtime
LABEL org.opencontainers.image.authors="martin.weise@tuwien.ac.at"
WORKDIR /app
......
import logging
from grafana_client.client import GrafanaException
from werkzeug.exceptions import NotFound
from api.dto import Permission
from clients import grafana_client
statistics_row_title = '${table_id}'
def remove_anonymous_read_access(uid: str) -> None:
grafana = grafana_client.connect()
permissions = grafana.dashboard.get_permissions_by_uid(uid)
viewer_role = [permission for permission in permissions if
'permissionName' in permission and permission['permissionName'] != 'View']
if len(viewer_role) == 0:
logging.warning(f'Failed to find permissionName=View')
return None
try:
response = grafana_client.generic_post(f'/api/access-control/dashboards/{uid}/builtInRoles/Viewer',
Permission(permission='').model_dump())
if response.status_code != 200:
raise OSError(f'Failed to remove anonymous read access: {response.content}')
except GrafanaException as e:
raise OSError(f'Failed to remove anonymous read access: {e.message}')
logging.info(f"Removed anonymous read access from dashboard with uid: {uid}")
def update_access(uid: str, username: str, permission: Permission) -> None:
try:
response = grafana_client.generic_get(f'/api/users/lookup?loginOrEmail={username}')
if response.status_code == 404:
raise NotFound(f"Failed to find user: {username}")
if response.status_code != 200:
raise OSError(f"Failed to add access to user: {username}")
grafana_client.generic_post(f"/api/access-control/dashboards/{uid}/users/{response.json()['id']}",
permission.model_dump())
except GrafanaException as e:
logging.error(f'Failed to add access: {e.message}')
logging.info(f"Add access for dashboard with uid: {uid}")
from __future__ import annotations
from typing import Optional
from pydantic import BaseModel
class Datasource(BaseModel):
uid: str
type: str
id: Optional[int] = None
orgId: Optional[int] = None
name: Optional[str] = None
typeLogoUrl: Optional[str] = None
access: Optional[str] = None
url: Optional[str] = None
user: Optional[str] = None
basicAuth: Optional[bool] = None
withCredentials: Optional[bool] = None
isDefault: Optional[bool] = None
version: Optional[int] = None
readOnly: Optional[bool] = None
jsonData: Optional[dict] = None
secureJsonFields: Optional[dict] = None
basicAuthUser: Optional[str] = None
basicAuthPassword: Optional[str] = None
password: Optional[str] = None
class CreateDatasource(BaseModel):
name: str
type: str
access: str
url: str
basicAuth: bool
version: int
readOnly: bool
jsonData: Optional[dict] = None
secureJsonData: Optional[dict] = None
basicAuthUser: Optional[str] = None
class Permission(BaseModel):
permission: str
class CreateDatasourceRequest(BaseModel):
database_internal_name: str
readonly: bool
type: str
import logging
import os
import requests
from requests import Response
from grafana_client import GrafanaApi
url = os.getenv('DASHBOARD_UI_ENDPOINT', 'http://localhost:3000')
username = os.getenv('SYSTEM_USERNAME', 'admin')
password = os.getenv('SYSTEM_PASSWORD', 'admin')
def connect() -> GrafanaApi:
return GrafanaApi.from_url(url=f'{url}', credential=(username, password))
def generic_get(api_url: str) -> Response:
request_url = url + api_url
logging.debug(f'generic get url={request_url}, auth=({username}, <reacted>)')
return requests.get(request_url, auth=(username, password))
def generic_post(api_url: str, payload: dict) -> Response:
request_url = url + api_url
logging.debug(f'generic post url={request_url}, payload={payload}, auth=({username}, <reacted>)')
return requests.post(request_url, json=payload, auth=(username, password))
import logging
import requests
from dataclasses import dataclass
from typing import List
from flask import current_app
from jwt import jwk_from_pem, JWT
@dataclass(init=True, eq=True)
class User:
username: str
roles: List[str]
class KeycloakClient:
def obtain_user_token(self, username: str, password: str) -> str:
response = requests.post(
f"{current_app.config['AUTH_SERVICE_ENDPOINT']}/realms/dbrepo/protocol/openid-connect/token",
data={
"username": username,
"password": password,
"grant_type": "password",
"client_id": current_app.config["AUTH_SERVICE_CLIENT"],
"client_secret": current_app.config["AUTH_SERVICE_CLIENT_SECRET"]
})
body = response.json()
if "access_token" not in body:
raise AssertionError(f"Failed to obtain user token(s): {response.status_code}")
return response.json()["access_token"]
def verify_jwt(self, access_token: str) -> User:
public_key = jwk_from_pem(str(current_app.config["JWT_PUBKEY"]).encode('utf-8'))
payload = JWT().decode(message=access_token, key=public_key, do_time_check=True)
return User(username=payload.get('client_id'), roles=payload.get('realm_access')["roles"])
Name Stmts Miss Cover
--------------------------------------------------
app.py 210 29 86%
clients/keycloak_client.py 36 9 75%
clients/opensearch_client.py 179 51 72%
--------------------------------------------------
TOTAL 425 89 79%
import logging
import os
from dbrepo.api.dto import Database, Table
from grafana_client.client import GrafanaException
from clients import grafana_client
statistics_row_title = '${table_id}'
base_url = os.getenv('BASE_URL', 'http://localhost')
datasource_uid = os.getenv('JSON_DATASOURCE_NAME', 'dbrepojson0')
def map_link(title: str, url: str) -> dict:
return dict(targetBlank=True,
asDropdown=False,
includeVars=False,
keepTime=False,
tags=[],
type='link',
icon='info',
title=title,
url=url)
def map_statistics_row(dashboard: dict) -> dict | None:
filtered_panels = [panel for panel in dashboard['panels'] if
panel['type'] == 'row' and panel['title'] == statistics_row_title and 'id' in panel]
if len(filtered_panels) > 0 and filtered_panels[0]['id'] is not None:
return filtered_panels[0]
logging.warning(f'Failed to find statistics row id')
return None
def map_links(database: Database) -> [dict]:
links = []
if len(database.identifiers) > 0:
links.append(map_link('Database', f"{base_url}/pid/{database.identifiers[0].id}"))
else:
links.append(map_link('Database', f"{base_url}/database/{database.id}"))
return links
def map_templating(database: Database) -> dict:
options = [dict(selected=False,
text=table.name,
value=str(table.id)) for table in database.tables]
selected = dict(selected=True,
text=[table.name for table in database.tables],
value=[str(table.id) for table in database.tables])
datasource = dict(uid=datasource_uid,
type='yesoreyeram-infinity-datasource')
return dict(list=[dict(description='',
name='table_id',
hide=0,
includeAll=True,
multi=True,
datasource=datasource,
refresh=1,
regex='',
sort=0,
definition='dbrepo-json- (infinity) json',
query=dict(queryType='infinity',
query='',
infinityQuery=dict(format='table',
filters=[],
parser='backend',
refId='variable',
root_selector='',
source='url',
type='json',
url=f"/api/database/{database.id}/table",
columns=[dict(selector='id',
text='value',
type='number'),
dict(
selector='internal_name',
text='name',
type='string')],
url_options=dict(data='',
method='GET'))),
label='Table ID',
skipUrlSync=False,
type='query',
current=selected,
options=options)])
def map_timeseries_panel(database: Database, table: Table) -> dict:
datasource = dict(uid=datasource_uid,
type='yesoreyeram-infinity-datasource')
return dict(
title=table['name'],
type='timeseries',
datasource=datasource,
targets=[dict(datasource=datasource,
format='table',
global_query_id='',
hide=False,
refId='A',
root_selector='',
source='url',
type='json',
url=f"/api/database/{database['id']}/table/{table['id']}",
url_options=dict(data='',
method='GET'))],
gridPos=dict(h=8,
w=12,
x=0,
y=0),
options=dict(legend=dict(displayMode='list',
placement='bottom',
showLegend=True),
tooltip=dict(mode='single',
sort='none')),
fieldConfig=dict(
defaults=dict(color=dict(mode='palette-classic'),
custom=dict(
axisBorderShow=False,
axisCenteredZero=False,
axisColorMode='text',
axisLabel='',
axisPlacement='auto',
barAlignment=0,
drawStyle='line',
fillOpacity=0,
gradientMode='none',
hideFrom=dict(legend=False,
tooltip=False,
viz=False),
insertNulls=False,
lineInterpolation='linear',
lineWidth=1,
pointSize=5,
scaleDistribution=dict(type='linear'),
showPoints='auto',
spanNulls=False,
stacking=dict(group='A',
mode='none'),
thresholdsStyle=dict(mode='absolute')))))
def map_panels(dashboard: dict, database_id: int | None = None) -> [dict]:
datasource = dict(uid=datasource_uid,
type='yesoreyeram-infinity-datasource')
if map_statistics_row(dashboard) is None:
dashboard['panels'].append(dict(collapsed=False,
repeat='table_id',
repeatDirection='h',
title=statistics_row_title,
type='row',
panels=[],
targets=[dict(refId='A',
datasource=datasource)],
gridPos=dict(h=1,
w=24,
x=0,
y=0)))
dashboard['panels'].append(dict(title='Sample',
type='table',
fieldConfig=dict(
defaults=dict(
color=dict(mode='palette-classic'),
custom=dict(axisBorderShow=False,
axisCenteredZero=False,
axisColorMode='text',
axisLabel='',
axisPlacement='auto',
barAlignment=0,
drawStyle='line',
fillOpacity=0,
gradientMode='none',
hideFrom=dict(
legend=False,
tooltip=False,
viz=False),
insertNulls=False,
lineInterpolation='linear',
lineWidth=1,
pointSize=5,
scaleDistribution=dict(
type='linear'),
showPoints='auto',
spanNulls=False,
stacking=dict(group='A',
mode='none'),
thresholdsStyle=dict(
mode='off'))),
overrides=[]),
options=dict(legend=dict(displayMode='list',
placement='bottom',
showLegend=True,
calcs=[]),
tooltip=dict(mode='single',
sort='none')),
targets=[dict(format='json',
columns=[],
datasource=datasource,
filters=[],
global_query_id='',
refId='A',
root_selector='',
source='url',
type='json',
url='/api/database/' + str(
database_id) + '/table/${table_id}/data',
url_options=dict(data='',
method='GET'))],
datasource=datasource,
gridPos=dict(h=4,
w=12,
x=0,
y=0)))
return dashboard['panels']
def find(uid: str):
grafana = grafana_client.connect()
try:
return grafana.dashboard.get_dashboard(uid)
except GrafanaException:
return None
def create(database_name: str, uid: str = '') -> dict:
grafana = grafana_client.connect()
dashboard = dict(uid=uid,
title=f'{database_name} Overview',
tags=['generated', 'dbrepo'],
timezone='browser',
fiscalYearStartMonth=1,
panels=[])
dashboard['panels'] = map_panels(dashboard)
payload = dict(folderUid='',
overwrite=False,
dashboard=dashboard)
dashboard = grafana.dashboard.update_dashboard(payload)
logging.info(f"Created dashboard with uid: {dashboard['uid']}")
return dashboard
def find(uid: str) -> dict | None:
grafana = grafana_client.connect()
try:
return grafana.dashboard.get_dashboard(uid)['dashboard']
except GrafanaException:
return None
def delete(uid: str) -> None:
grafana = grafana_client.connect()
grafana.dashboard.delete_dashboard(uid)
def update(database: Database) -> dict:
grafana = grafana_client.connect()
dashboard = find(database.dashboard_uid)
# update metadata
if len(database.identifiers) > 0 and len(database.identifiers[0].titles) > 0:
dashboard['title'] = database.identifiers[0].titles[0].title
if len(database.identifiers) > 0 and len(database.identifiers[0].descriptions) > 0:
dashboard['description'] = database.identifiers[0].descriptions[0].description
dashboard['links'] = map_links(database)
dashboard['templating'] = map_templating(database)
# update panels
dashboard['panels'] = map_panels(dashboard, database.id)
payload = dict(folderUid='',
overwrite=True,
dashboard=dashboard)
dashboard = grafana.dashboard.update_dashboard(payload)
logging.info(f"Updated dashboard with uid: {dashboard['uid']}")
return dashboard