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
|
echo "registered HoloLake knowledge repository is missing" >&2
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
if command -v setfacl >/dev/null 2>&1; then
|
command -v setfacl >/dev/null 2>&1 || {
|
||||||
setfacl -R -m u:guanghu-authz:rX "$knowledge_repo"
|
echo "setfacl is required for private knowledge repository access" >&2
|
||||||
setfacl -R -d -m u:guanghu-authz:rX "$knowledge_repo"
|
exit 1
|
||||||
fi
|
}
|
||||||
|
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
|
runuser -u guanghu-authz -- git --git-dir="$knowledge_repo" rev-parse --verify refs/heads/main >/dev/null
|
||||||
|
|
||||||
systemctl daemon-reload
|
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, /openssl rand -hex 32/);
|
||||||
assert.match(source, /manual-backups\/lake-lamp-authz-/);
|
assert.match(source, /manual-backups\/lake-lamp-authz-/);
|
||||||
assert.match(source, /rollback\(\)/);
|
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.match(source, /setfacl -R -m u:guanghu-authz:rX/);
|
||||||
assert.doesNotMatch(source, /cat ["']?\$authorization_env/);
|
assert.doesNotMatch(source, /cat ["']?\$authorization_env/);
|
||||||
assert.doesNotMatch(source, /set -x/);
|
assert.doesNotMatch(source, /set -x/);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue