Resolve "Support custom authentication backends" #1979

Merged
hansegucker merged 5 commits from feature/custom-auth-backends into master 2020-07-30 23:48:02 +02:00
Owner

Close #295

Close #295
Owner

This MR is lacking screenshots and a related issue. Please open a feature request issue and outlay the idea behind this, the current use cases, and security considerations (e.g. how do you prevent a malicious app from wreaking havoc? Consider attack chains — i.e. some third-party, or even official, app is replaced by malicious code, how do you keep the impact small? This change potentially allows an app to completely disable authentication.)

This MR is lacking screenshots and a related issue. Please open a feature request issue and outlay the idea behind this, the current use cases, and security considerations (e.g. how do you prevent a malicious app from wreaking havoc? Consider attack chains — i.e. some third-party, or even official, app is replaced by malicious code, how do you keep the impact small? This change potentially allows an app to completely disable authentication.)
Author
Owner

changed title from {-Custom authentication backends-} to {+Resolve "Support custom authentication backends"+}

changed title from **{-Custom authentication backends-}** to **{+Resolve "Support custom authentication backends"+}**
Author
Owner

changed the description

changed the description
Author
Owner

I understand that you're concerned about security risks. But actually an app can provide a public view which internally creates an user and logins the user directly – the authentication is completely disabled, too. Please help me to understand how this differs.

I understand that you're concerned about security risks. But actually an app can provide a public view which internally creates an user and logins the user directly – the authentication is completely disabled, too. Please help me to understand how this differs.
Owner

Have you ever done a code audit?

Some things (like calling createsuperuser()) are easier to spot than swapping if/else in an authentication conditional ;).

Have you ever done a code audit? Some things (like calling createsuperuser()) are easier to spot than swapping if/else in an authentication conditional ;).
Author
Owner

Have you ever done a code audit?

As you can imagine, no, I have never done.

Some things (like calling createsuperuser()) are easier to spot than swapping if/else in an authentication conditional ;).

I have multiple possible ideas:

  • Logging a warning if there are additional backends included
  • Show all included backends in system status
  • Let users activate backends by site preferences
> Have you ever done a code audit? As you can imagine, no, I have never done. > Some things (like calling createsuperuser()) are easier to spot than swapping if/else in an authentication conditional ;). I have multiple possible ideas: - Logging a warning if there are additional backends included - Show all included backends in system status - Let users activate backends by site preferences
Owner

Having a whitelist is site preferences seems like a good step.

Having a whitelist is site preferences seems like a good step.
Author
Owner

added 1 commit

  • 71b3c2ad - Make custom authentication backends configurable via site preferences

Compare with previous version

added 1 commit <ul><li>71b3c2ad - Make custom authentication backends configurable via site preferences</li></ul> [Compare with previous version](/AlekSIS/official/AlekSIS/-/merge_requests/334/diffs?diff_id=2830&start_sha=4d8b48a38e1a6f4619011f47771280e57aa1a58d)
Author
Owner

OK, I did some work on this topic.

OK, I did some work on this topic.
Author
Owner

resolved all threads

resolved all threads
Author
Owner

With alternative login options

image

Without alternative login options

image

### With alternative login options ![image](/uploads/3a0edb81c26b036b900376493f3a13be/image.png) ### Without alternative login options ![image](/uploads/1adb9d20cf2a573c9196d8773b61477f/image.png)
nik scheduled this pull request to auto merge when all checks succeed 2020-07-15 17:20:16 +02:00
Owner

Please add a test case that tries to add a backend and login using this backend, without enabling it in site preferences.

Please add a test case that tries to add a backend and login using this backend, without enabling it in site preferences.
Author
Owner

aborted the automatic merge because source branch was updated

aborted the automatic merge because source branch was updated
Author
Owner

added 1 commit

  • 5680c5d0 - Provide alternativ login options as backend list, too

Compare with previous version

added 1 commit <ul><li>5680c5d0 - Provide alternativ login options as backend list, too</li></ul> [Compare with previous version](/AlekSIS/official/AlekSIS/-/merge_requests/334/diffs?diff_id=2861&start_sha=71b3c2adece411c7eed2c802183f065eb3ba9071)
Author
Owner

added 1 commit

  • b20a9566 - Add test for custom authentication backends and fix a little bit

Compare with previous version

added 1 commit <ul><li>b20a9566 - Add test for custom authentication backends and fix a little bit</li></ul> [Compare with previous version](/AlekSIS/official/AlekSIS/-/merge_requests/334/diffs?diff_id=2865&start_sha=5680c5d0868af0dfa5faeffa987ec1401877ce7c)
Author
Owner

Done.

Done.
Author
Owner

resolved all threads

resolved all threads
Owner

mentioned in commit 4e6ceb0fe8

mentioned in commit 4e6ceb0fe8524108e4e132787419bfab35eb820e
Owner

merged

merged
Owner

mentioned in merge request !2104

mentioned in merge request !2104
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
aleksis/AlekSIS-Core!1979
No description provided.