Created
April 9, 2026 02:25
-
-
Save miya0001/bf920c2ba77687cedd7fc6fba2e505fd to your computer and use it in GitHub Desktop.
一般ユーザーをreadonlyにする
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| geonic admin policies create '{ | |
| "policyId": "user-readonly", | |
| "description": "user ロールをデータ API で読み取り専用に制限", | |
| "target": { | |
| "subjects": [{"attributeId": "role", "matchValue": "user"}] | |
| }, | |
| "ruleCombiningAlgorithm": "first-applicable", | |
| "rules": [ | |
| { | |
| "ruleId": "deny-post", | |
| "effect": "Deny", | |
| "target": { | |
| "actions": [{"attributeId": "method", "matchValue": "POST"}], | |
| "resources": [ | |
| {"attributeId": "path", "matchValue": "/v2/**"}, | |
| {"attributeId": "path", "matchValue": "/ngsi-ld/**"} | |
| ] | |
| } | |
| }, | |
| { | |
| "ruleId": "deny-patch", | |
| "effect": "Deny", | |
| "target": { | |
| "actions": [{"attributeId": "method", "matchValue": "PATCH"}], | |
| "resources": [ | |
| {"attributeId": "path", "matchValue": "/v2/**"}, | |
| {"attributeId": "path", "matchValue": "/ngsi-ld/**"} | |
| ] | |
| } | |
| }, | |
| { | |
| "ruleId": "deny-put", | |
| "effect": "Deny", | |
| "target": { | |
| "actions": [{"attributeId": "method", "matchValue": "PUT"}], | |
| "resources": [ | |
| {"attributeId": "path", "matchValue": "/v2/**"}, | |
| {"attributeId": "path", "matchValue": "/ngsi-ld/**"} | |
| ] | |
| } | |
| }, | |
| { | |
| "ruleId": "deny-delete", | |
| "effect": "Deny", | |
| "target": { | |
| "actions": [{"attributeId": "method", "matchValue": "DELETE"}], | |
| "resources": [ | |
| {"attributeId": "path", "matchValue": "/v2/**"}, | |
| {"attributeId": "path", "matchValue": "/ngsi-ld/**"} | |
| ] | |
| } | |
| } | |
| ], | |
| "priority": 100 | |
| }' |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
このポリシーを無効化するには以下のコマンドで