hm, now I noticed that there is no arm image and I am running casibase on m1 macbook 🙂 So maybe it's emulation overhead...
I have tried to build image on my box but node crashes
refreshing vectors from cvs files, I have a few milion rows...
i have increased Frequency, Memory limit, Limit minutes by 100 but dont see much diffrence
I am using mutiple gunicorn workers
INSTALLED_APPS = [
'casbin_adapter.apps.CasbinAdapterConfig'
]
CASBIN_MODEL = os.path.join("finbox_dashboard/casbin_middleware/authz_model.conf")
watcher = PostgresqlWatcher(host=BANK_CONNECT_APIS_PG_HOST_URL, port=BANK_CONNECT_APIS_PG_PORT,
user=BANK_CONNECT_APIS_PG_USER, password=***, dbname=BANK_CONNECT_APIS_PG_DBNAME, enforcer=enforcer)
watcher.set_update_callback(enforcer.load_policy)
enforcer.set_watcher(watcher)
using this setup django migration and casbin is working but watcher is not working
for watcher listen/notify service is created in db on any change in casbin policy worker notifies db and other workers are polling that change, but i observed a single worker(single instance of enforcer) fetches all triggers and apart from that set_update_callback is never called
i need watcher even when using single server because of gunicorn workers spinning up different django app
@hsluoyz hey one more thing is there any support for using same redis cache for all workers instead of in memory and psql for permanent storage by this way i won’t require watcher
i guess watcher is not working in django
subOwner = anonymous, subName = anonymous, method = POST, urlPath = /api/login/oauth, obj.Owner = , obj.Name = , result = allow
2024/05/24 12:54:06.757 [I] (10.0.0.4: ) subOwner = anonymous, subName = anonymous, method = POST, urlPath = /api/login/oauth, obj.Owner = , obj.Name = , result = allow
2024/05/24 12:54:06.759 [C] the request url is /api/login/oauth/access_token
2024/05/24 12:54:06.759 [C] Handler crashed with error runtime error: invalid memory address or nil pointer dereference
2024/05/24 12:54:06.759 [C] /usr/local/go/src/runtime/panic.go:884
2024/05/24 12:54:06.759 [C] /usr/local/go/src/runtime/panic.go:260
2024/05/24 12:54:06.759 [C] /usr/local/go/src/runtime/signal_unix.go:841
2024/05/24 12:54:06.759 [C] /go/src/casdoor/object/token_oauth.go:247
2024/05/24 12:54:06.759 [C] /go/src/casdoor/controllers/token.go:219
2024/05/24 12:54:06.759 [C] /usr/local/go/src/reflect/value.go:586
2024/05/24 12:54:06.759 [C] /usr/local/go/src/reflect/value.go:370
2024/05/24 12:54:06.759 [C] /go/pkg/mod/github.com/beego/beego@v1.12.12/router.go:897
2024/05/24 12:54:06.759 [C] /usr/local/go/src/net/http/server.go:2936
2024/05/24 12:54:06.759 [C] /usr/local/go/src/net/http/server.go:1995
2024/05/24 12:54:06.759 [C] /usr/local/go/src/runtime/asm_amd64.s:1598
2024/05/24 12:54:06.759 [HTTP] http: superfluous response.WriteHeader call from github.com/beego/beego/context.(*Response).WriteHeader (context.go:240)
Okay thank you. Is it possible to use casdoor in multiple instances without redis?
You can get all this information from your casdoor configuration.
I can't reproduce it, because i can login into that page. How should this be done?
@hsluoyz wow, thank you very much, i saw your commit, it works now with v1.595 with the new sendgrid provider!!!!!
Nevermind, mounting it to the Docker Compose file worked.
Okay, but how to do the import of the public cert for the casdoor sdk. Is it enough to just save it as a String?
Sorry for not being clear enough. I try the code from the docs but still same issue. Following code:package main
fmt.Println(claims)
}
This error occurs when im trying on the demo casdoor page too
@hsluoyz get the OAuthToken with the state and the code and then try to parse the Token i get from that
What does it mean when i try to parse JWT token then i get the error message invalid key: Key must be a PEM encoded PKCS1 or PKCS8 key
unfortunately still 403 my request looks like this:
func main() {
client := &http.Client{}
req, err := http.NewRequest("GET", "https://demo.casdoor.com/api/get-all-objects", nil)
if err != nil {
log.Fatal(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Basic dd48c1a083b0c3cf4635 d85a6900eaccaeddf1b9ff28f973021be19fbd0f")
resp, err := client.Do(req)
if err != nil {
log.Fatal(err)
}
defer resp.Body.Close()
bodyText, err := io.ReadAll(resp.Body)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%s\n", resp.Status)
fmt.Printf("%s\n", bodyText)
}
I don't see it in my own local app, it's possible I missed some required fields setttings.😆
reset it in User Management > Users
You may try it with admin roles
so you should reset yourr pwds to match(if you use plain text, just replace the one in DB with what you input on UI frontend, otherwise(if you use bcrypt) you should hash pwd before updating what stored in your DB)
I'm new to casdoor too, just have read the code about update user field yesterday , so... just try as much as you can, haha..
maybe they are not match between your password in DB and what you input
You may check Orgnization Settings under User Management, a Password type section should show up.
the default pwd is 123, have a try
