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

SSH keys should not be allowed to be deleted when coming from LDAP #13983

Closed
strk opened this issue Dec 14, 2020 · 3 comments · Fixed by #13985
Closed

SSH keys should not be allowed to be deleted when coming from LDAP #13983

strk opened this issue Dec 14, 2020 · 3 comments · Fixed by #13985
Labels
topic/authentication type/proposal The new feature has not been accepted yet but needs to be discussed first.

Comments

@strk
Copy link
Member

strk commented Dec 14, 2020

When SSH keys are retrived from LDAP it makes no sense to allow removing them in Gitea (as they would be re-added anyway on next login). I would also go a step further and disallow also adding them, as LDAP would then be the only point-of-truth.

@zeripath zeripath added type/proposal The new feature has not been accepted yet but needs to be discussed first. topic/authentication labels Dec 14, 2020
@zeripath
Copy link
Contributor

the simplest (albeit temporary) solution is to change the templates to remove the option of deleting and adding ssh_keys.

zeripath added a commit to zeripath/gitea that referenced this issue Dec 14, 2020
When a user has a login source which has SSH key management
key addition and deletion using the UI should be disabled.

Fix go-gitea#13983

Signed-off-by: Andrew Thornton <art27@cantab.net>
@strk
Copy link
Member Author

strk commented Dec 22, 2020

@zeripath in our case we'll want to keep the "Add" button, just having it take the user to our LDAP editing screen. This is possibly too custom to support, unless we want to add a configuration item for that (ssh key add link...)

techknowlogick pushed a commit that referenced this issue Dec 26, 2020
* Disable SSH key addition and deletion when externally managed

When a user has a login source which has SSH key management
key addition and deletion using the UI should be disabled.

Fix #13983

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Make only externally managed keys disabled

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
@zeripath
Copy link
Contributor

Yup you should do that with a custom template

@go-gitea go-gitea locked and limited conversation to collaborators Feb 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
topic/authentication type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants