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

Development: Re-enable HTTP basis authentication method and extend security documentation #8411

Merged
merged 6 commits into from
Apr 18, 2024

Conversation

julian-christl
Copy link
Member

@julian-christl julian-christl commented Apr 16, 2024

Checklist

General

Server

Motivation and Context

Contacted by a user who uses Basis Auth to retrieve information from via the API directly, I found out that the Spring Boot 3 unintentionally (at least as far as I know) deactivated HTTP Basic Auth.
As we didn't deprecated it publically, this PR re-enables it.

Description

I re-enabled it \o/
It looks, however, like it only works for external accounts when the external accounts are enabled. As I intend to refactor the authentication in that regard anyway, I won't debug this as the user will use their external account anyway.

Steps for Testing

  • Log in via the webclient (external user) and navigate on one or two pages
  • Access a secured endpoint that your user has access to via basis auth (e.g. using Postman or curl) (external user)

Both should still work.

Testserver States

Note

These badges show the state of the test servers.
Green = Currently available, Red = Currently locked







Review Progress

Code Review

  • Code Review 1
  • Code Review 2

Manual Tests

  • Test 1
  • Test 2

Summary by CodeRabbit

  • New Features
    • Enhanced security with the introduction of HTTP basic authentication configurations.
    • Conditionally added configuration for LTI integration.
    • Improved JWTConfigurer class for enhanced JWT-based authentication.

@julian-christl julian-christl self-assigned this Apr 16, 2024
@julian-christl julian-christl requested a review from a team as a code owner April 16, 2024 13:52
Copy link

coderabbitai bot commented Apr 16, 2024

Walkthrough

The update enhances the security configuration of a Java application by incorporating a Customizer from Spring Security to set up HTTP basic authentication with default configurations. This change aims to strengthen web interaction security by introducing conditional LTI configuration and a method for creating a JWTConfigurer for JWT-based authentication.

Changes

File Path Change Summary
.../artemis/config/SecurityConfiguration.java Added Customizer for configuring HTTP basic authentication with defaults. Conditionally configured LTI settings.
.../artemis/security/jwt/JWTConfigurer.java Updated JWTConfigurer with detailed JavaDoc comments. Constructor now requires TokenProvider. Added JWTFilter for JWT token handling.

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot added the server Pull requests that update Java code. (Added Automatically!) label Apr 16, 2024
coderabbitai[bot]
coderabbitai bot previously approved these changes Apr 16, 2024
Copy link
Contributor

@milljoniaer milljoniaer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code looks good 👍

milljoniaer
milljoniaer previously approved these changes Apr 16, 2024
Strohgelaender
Strohgelaender previously approved these changes Apr 16, 2024
@julian-christl julian-christl marked this pull request as draft April 16, 2024 14:21
@julian-christl julian-christl marked this pull request as ready for review April 16, 2024 15:23
laurenzfb
laurenzfb previously approved these changes Apr 16, 2024
Copy link
Contributor

@laurenzfb laurenzfb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested on staging + postman with basic auth. Seems to work

@krusche krusche changed the title Authentication: Re-enable HTTP basis authentication method Development: Re-enable HTTP basis authentication method Apr 17, 2024
@krusche krusche added this to the 7.0.1 milestone Apr 17, 2024
Copy link
Member

@krusche krusche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See my inline comment. I would appreciate better inline documentation.

@krusche
Copy link
Member

krusche commented Apr 17, 2024

I added some inline comments

coderabbitai[bot]
coderabbitai bot previously approved these changes Apr 17, 2024
coderabbitai[bot]
coderabbitai bot previously approved these changes Apr 17, 2024
@julian-christl julian-christl changed the title Development: Re-enable HTTP basis authentication method Development: Re-enable HTTP basis authentication method and extend security documentation Apr 17, 2024
…ion.java

Co-authored-by: Lucas Welscher <ga53foy@mytum.de>
Copy link
Contributor

@JohannesStoehr JohannesStoehr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice comments

@krusche krusche merged commit d0698a0 into develop Apr 18, 2024
34 of 40 checks passed
@krusche krusche deleted the bugfix/re-enable-basic-auth branch April 18, 2024 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready to merge server Pull requests that update Java code. (Added Automatically!)
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

6 participants