Casbin Forum runs on Casnode, the open-source Discourse-style forum. Try the Casnode demo →
Casbin Forum
D

Hi, can you update the .Net EFCore adapter dependency on Casbin.NET, it is currently on version 1.3 and the latest is 2.10, this is causing the adapter to fail on my project. I would submit a PR but it is against my company policy. Thanks

D

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

D

refreshing vectors from cvs files, I have a few milion rows...

D

i have increased Frequency, Memory limit, Limit minutes by 100 but dont see much diffrence

D

hello, i am playing with casibase for few days and it looks very very promissing... I have only one concern - building knowledge (i am using openai text-embedding-ada-002) is veeeryyy slow on my machine. Any tips how to improve performance? I am getting 1-3 csv rows per minute

D

Hey guys is there any possibility to integrate or implement custom billing calculation in casdoor ?

D

Hey im using the golang casdoorsdk and im trying to add a role with the sdk. The code looks like this:
role := casdoorsdk.Role{
Owner: a.client.OrganizationName,
Name: location.Partner.Name + "-" + location.Name,
DisplayName: "Role for location: " + location.Name + " of partner: " + location.Partner.Name,
Description: "",
Users: []string{a.client.OrganizationName + "/" + userName},
Groups: []string{},
Roles: []string{},
Domains: []string{},
IsEnabled: true,
}
return a.client.AddRole(&role)

But i always get an bad request error, why?

I tested more now and when im assigning a string like "mystring" as name property everything works fine. But when i assigne the string from a variable into the name property it gives me a bad request error.

After some more test i found out that it only happens if you add a name with a space as string like: "my string". This is weird because in the casdoor ui and over the api i can easily add names for roles with spaces.

D

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

D

@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

D

Hello , anyone used psql watcher with django orm adaptor

D

Hi.

docker run  --network localdev  --name casdoor-api   -e driverName=mysql -e dataSourceName='userNameAzure:PwdAzure@tcp(mysql-database.azure:3306)/  sslmode=true dbname=my-db'  -d -p 8000:8000 casbin/casdoor:latest

I’m using the Casdoor Site Command Line to connect to the Azure MySQL Database, but even if I enable SSL Mode, the following message appears using insecure transport are Forbidden --require_secure_transport=ON. Does anyone know how to solve it?

D
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)
D

Hi all, why when the following request:

curl --request POST \
  --url http://casdoor.localhost:9876/api/login/oauth/access_token \
  --header 'content-type: application/json' \
  --data '{"grant_type": "token","client_id": "ca52da969e6c6d667788","client_secret": "***"}'

returns casdoor:runtime error: invalid memory address or nil pointer dereference

D

Hi, is it possible to use casdoor in multiple instances without redis?

D

Don't we get the permissions of the user when parsing the JWT token we got from logging in?

D

Okay thank you. Is it possible to use casdoor in multiple instances without redis?

D

We fixed that issue. But one question left, is it possible to run multiple instances of casdoor in kubernetes? Because if we run 2 instances of casdoor we cant login anymore. But if we run casdoor in just one instance, everythings fine

D

You can get all this information from your casdoor configuration.

D

I can't reproduce it, because i can login into that page. How should this be done?

D

We deployed casdoor and when we want to login in casdoor with admin and 123 it says logged in successfully but doesnt redirect us to the casdoor page and it says please login first when trying get-account api any ideas?

D

We moved our casdoor client to a kubernetes cluster now but when we want to login now we just get a 403 forbidden error as a response.

Anybody an idea?

D

@hsluoyz wow, thank you very much, i saw your commit, it works now with v1.595 with the new sendgrid provider!!!!!

D

Hello everyone!
I have a question about the email providers in Casdoor. We have tried out the self-hosted version of Casdoor, and the email provider worked perfectly, but when we've used the paid version of casdoor, the email provider (SendGrid) didn't work, the "test smtp connection" button returns a timeout error message (with the ip address of smtp.sendgrid.net). Do you know what could cause the problem?

D

Nevermind, mounting it to the Docker Compose file worked.

D

Not able to upload media, as the following error is outputted:

Casdoor fails to create folder: "/files/resource/built-in/admin" for local file system storage provider: mkdir /files: permission denied. Make sure Casdoor process has correct permission to create/access it, or you can create it manually in advance

This is running via Docker.