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

Ory based authorization #858

Draft
wants to merge 54 commits into
base: dev
Choose a base branch
from
Draft

Conversation

Bdegraaf1234
Copy link
Member

Description: Gather all PRs related to moving from spring-security based oauth2 to ory.

Checklist:

  • The Main workflow has succeeded
  • The Gatling tests have passed
  • I have logged into the portal running locally with default admin credentials
  • I have updated the README files if this change requires documentation update
  • I have commented my code, particularly in hard-to-understand areas

@Bdegraaf1234 Bdegraaf1234 changed the title Run tests on feature branches Ory base dauthorization Jun 12, 2024
@Bdegraaf1234 Bdegraaf1234 changed the title Ory base dauthorization Ory based authorization Jun 12, 2024
@Bdegraaf1234 Bdegraaf1234 marked this pull request as draft June 20, 2024 13:42
@Throws(Exception::class)
public override fun configure(http: HttpSecurity) {
http
.csrf().disable()

Check failure

Code scanning / CodeQL

Disabled Spring CSRF protection High

CSRF vulnerability due to protection being disabled.

Copilot Autofix AI about 1 month ago

To fix the issue, we need to enable CSRF protection in the SecurityConfiguration class. This involves removing the csrf().disable() line from the configure method. By doing this, we ensure that CSRF protection is enabled, which helps prevent CSRF attacks.

  • General Fix: Enable CSRF protection by removing the line that disables it.
  • Detailed Fix: Remove the csrf().disable() line from the configure method in the SecurityConfiguration class.
  • Specific Changes: Edit the configure method in the SecurityConfiguration class located in src/main/java/org/radarbase/management/config/SecurityConfiguration.kt.
Suggested changeset 1
src/main/java/org/radarbase/management/config/SecurityConfiguration.kt

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/src/main/java/org/radarbase/management/config/SecurityConfiguration.kt b/src/main/java/org/radarbase/management/config/SecurityConfiguration.kt
--- a/src/main/java/org/radarbase/management/config/SecurityConfiguration.kt
+++ b/src/main/java/org/radarbase/management/config/SecurityConfiguration.kt
@@ -123,3 +123,2 @@
             http
-                .csrf().disable()
                 .sessionManagement()
EOF
@@ -123,3 +123,2 @@
http
.csrf().disable()
.sessionManagement()
Copilot is powered by AI and may make mistakes. Always verify output.
Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
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 this pull request may close these issues.

3 participants