fix: require private knowledge ACL support
This commit is contained in:
parent
d9803849c1
commit
0d105d03ec
2 changed files with 8 additions and 4 deletions
|
|
@ -193,10 +193,12 @@ fi
|
|||
echo "registered HoloLake knowledge repository is missing" >&2
|
||||
exit 1
|
||||
}
|
||||
if command -v setfacl >/dev/null 2>&1; then
|
||||
setfacl -R -m u:guanghu-authz:rX "$knowledge_repo"
|
||||
setfacl -R -d -m u:guanghu-authz:rX "$knowledge_repo"
|
||||
fi
|
||||
command -v setfacl >/dev/null 2>&1 || {
|
||||
echo "setfacl is required for private knowledge repository access" >&2
|
||||
exit 1
|
||||
}
|
||||
setfacl -R -m u:guanghu-authz:rX "$knowledge_repo"
|
||||
setfacl -R -d -m u:guanghu-authz:rX "$knowledge_repo"
|
||||
runuser -u guanghu-authz -- git --git-dir="$knowledge_repo" rev-parse --verify refs/heads/main >/dev/null
|
||||
|
||||
systemctl daemon-reload
|
||||
|
|
|
|||
|
|
@ -24,6 +24,8 @@ test("bootstrap installer preserves secrets and deploys the complete HoloLake ca
|
|||
assert.match(source, /openssl rand -hex 32/);
|
||||
assert.match(source, /manual-backups\/lake-lamp-authz-/);
|
||||
assert.match(source, /rollback\(\)/);
|
||||
assert.match(source, /command -v setfacl/);
|
||||
assert.match(source, /setfacl is required for private knowledge repository access/);
|
||||
assert.match(source, /setfacl -R -m u:guanghu-authz:rX/);
|
||||
assert.doesNotMatch(source, /cat ["']?\$authorization_env/);
|
||||
assert.doesNotMatch(source, /set -x/);
|
||||
|
|
|
|||
Loading…
Reference in a new issue