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

Add option to define some auth credentials to restrict access to the /db-scheduler-ui path #126

Closed
afrancis-caregility opened this issue Nov 13, 2024 · 3 comments · Fixed by #129

Comments

@afrancis-caregility
Copy link

Hi,
It would be great if you could add 1 or 2 runtime properties to setup authenticated access to the UI.
At least basic auth popup would be appreciated especially for applications exposed over the internet.

@kagkarlsson
Copy link
Collaborator

I think you should be able to add this yourself via for example a Spring Security filter

@driesva
Copy link
Contributor

driesva commented Jan 22, 2025

That's exactly what we did, we have a SecurityFilterChain protecting the db-scheduler-ui URLs.

One slight issue is that in case your session is expired, you do not actually notice it. Might be solved in the frontend by e.g.

    if (response.status == 401) {
        document.location.href = '/db-scheduler';
    }

(or kind of popup indicating you have to re-login)

Another thing related to security is authorization, currently it's an all or nothing approach. Either you have no access or full access. Ideally there would be read-only mode. Where you can just view the scheduling, but not alter it. With Spring Security there's a way to deny POST requests for certain roles. But ideally the buttons to alter tasks do not appear.

This read-only mode might maybe be useful even without Spring Security, e.g. via configuration db-scheduler-ui.read-only=true

@driesva
Copy link
Contributor

driesva commented Jan 24, 2025

I worked out my ideas in PR #129

Feel free to accept, improve or even reject it.

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

Successfully merging a pull request may close this issue.

3 participants