Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Details modal still returning 401 for Canary Checker #2330

Open
PrestonCS opened this issue Nov 4, 2024 · 3 comments
Open

Details modal still returning 401 for Canary Checker #2330

PrestonCS opened this issue Nov 4, 2024 · 3 comments

Comments

@PrestonCS
Copy link

I am running latest release of UI v1.0.820 and of canary checker v1.1.0-rc2 but I still cannot open details modal for any check it still returns a 401

image

I have opened an issue before for this and it was supposed to be resolved but I have yet been able to get this to work.

Previous issue was #2275

@moshloop
Copy link
Member

Hi @PrestonCS - We have a public site remote v1.1.0-rc2 here: https://canary-checker-demo.azure.lab.flanksource.com which does not have any errors.

Could you share the response headers/body? Also happy to jump on a call and help

@PrestonCS
Copy link
Author

@moshloop Thank you, Looking at the response body gave me the valid error.

{"code":"42501","details":null,"hint":null,"message":"permission denied to set role \"postgrest_anon\""}

This all started once I migrated to PostgreSQL. The issue was the postgrest_anon role was missing login rights.

Executing the following on the DB solved the issue

GRANT postgrest_anon TO canaryadmin;

I assume this is the wrong area for this issue as this would now be related to canary checker but isn't the canary checker app responsible for creating this role when it sets up the database on first start? Shouldn't the app be doing this for me?

@moshloop moshloop transferred this issue from flanksource/flanksource-ui Nov 12, 2024
@moshloop
Copy link
Member

@PrestonCS - We are doing this here: https://github.com/flanksource/duty/blob/main/migrate/migrate.go#L111.

What is the value of --db-migrations / db.runMigrations - It should attempt to grant the roles on startup. Are there any errors in the logs on startup ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants