docker_auth icon indicating copy to clipboard operation
docker_auth copied to clipboard

xorm acl mysql example / doc

Open ezkrg opened this issue 4 years ago • 4 comments

hello, i've tried many ways to add xorm_acl_entry in mysql but no luck, some of them:

yaml:

insert into xorm_acl_entry values ('match: {account: "test"}\nactions: ["push", "pull"]', 10);
insert into xorm_acl_entry values ('- match: {account: "test"}\n  actions: ["push", "pull"]', 10);

yaml inline:

insert into xorm_acl_entry values ('{match: {account: test}, actions: [push, pull]}', 10);
insert into xorm_acl_entry values ('[{match: {account: test}, actions: [push, pull]}]', 10);

json:

insert into xorm_acl_entry values ('{"match": {"account": "test"}, "actions": ["push", "pull"]}', 10);
insert into xorm_acl_entry values ('[{"match": {"account": "test"}, "actions": ["push", "pull"]}]', 10);

log:

Config from /config/auth_config.yml (0 users, 0 ACL static entries)
Created ACL Authorizer with 0 entries
Got new ACL from XORM: []
Installed new ACL from XORM (0 entries)

Please show an example. Thanks!

ezkrg avatar Nov 14 '21 10:11 ezkrg

Having the same problem with Postgres

kimsk132 avatar May 19 '22 13:05 kimsk132

I believe this is a bug. When I run the logic that reads ACL from database: err = engine.OrderBy("seq").Find(&newACL) I got the following error: unsupported non or composited primary key cascade My guess is you need some kind of logic to convert the text read from the database into a proper struct.

kimsk132 avatar May 21 '22 14:05 kimsk132

We have the same issue. None of the above entries are identified. I1021 14:44:16.078731 1 main.go:246] docker_auth build I1021 14:44:16.084082 1 main.go:61] Config from /config/auth_config.yml (2 users, 0 ACL static entries) I1021 14:44:16.097002 1 main.go:110] Cert file: /certs/token_public_certificate.pem I1021 14:44:16.097033 1 main.go:111] Key file : /certs/token_private.key I1021 14:44:16.099771 1 main.go:173] Serving on :5001

saurtiwa3 avatar Oct 21 '22 15:10 saurtiwa3

Did anyone figure this out?

benbooth493 avatar Nov 30 '23 14:11 benbooth493