forked from mtusi2026/mtusi2026lab7
lab7: OpenBao 2.7.3 (не dev, raft на volume, TLS, audit), AppRole и scoped policy для api/relay/worker, секреты только из OpenBao, скрипт оператора и проверка allow/deny
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
# Policy of the AppRole `api` (API replicas). Exactly one secret path, read only:
|
||||
# messenger/data/api = database_url (role messenger_api), cache_url (Valkey ACL user api),
|
||||
# s3_access_key_id / s3_secret_access_key (identity messenger-api: Write staging + Read final).
|
||||
# No metadata/list/write, no other service's path, no sys/*, no policy management. The token is
|
||||
# created with token_no_default_policy=true, so self-management is granted explicitly below.
|
||||
path "messenger/data/api" {
|
||||
capabilities = ["read"]
|
||||
}
|
||||
|
||||
path "auth/token/lookup-self" {
|
||||
capabilities = ["read"]
|
||||
}
|
||||
|
||||
path "auth/token/revoke-self" {
|
||||
capabilities = ["update"]
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
# Policy of the AppRole `relay`: messenger/data/relay = database_url (role messenger_relay) and
|
||||
# broker_url (RabbitMQ user relay: publish to the jobs exchange only). Read only, nothing else.
|
||||
path "messenger/data/relay" {
|
||||
capabilities = ["read"]
|
||||
}
|
||||
|
||||
path "auth/token/lookup-self" {
|
||||
capabilities = ["read"]
|
||||
}
|
||||
|
||||
path "auth/token/revoke-self" {
|
||||
capabilities = ["update"]
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
# Policy of the AppRole `worker`: messenger/data/worker = database_url (role messenger_worker),
|
||||
# broker_url (RabbitMQ user worker: consume the jobs queue only), s3 key pair messenger-worker
|
||||
# (staging + final, no List, no Admin). No admin credentials of the API, the database or S3.
|
||||
path "messenger/data/worker" {
|
||||
capabilities = ["read"]
|
||||
}
|
||||
|
||||
path "auth/token/lookup-self" {
|
||||
capabilities = ["read"]
|
||||
}
|
||||
|
||||
path "auth/token/revoke-self" {
|
||||
capabilities = ["update"]
|
||||
}
|
||||
Reference in New Issue
Block a user