SSH public key import from LDAP (OD-102)
Michael Weimann opened 6 years ago

Story

As an user I would like to have my SSH public key imported from my LDAP data,
so that I only need to configure my keys in one place.

Sketch

There could be a field "User SSH Public Key" field in the LDAP config.
The system should then import the key.

I would suggest marking that key in some way as "from LDAP"/"LDAP",
so it could be updated / removed depending on LDAP updates.

  • Michael Weimann commented 6 years ago

    If you want I could try working on this one.

  • Robin Shen changed iterations 6 years ago
    Previous Value Current Value
    empty
    3.1.0
  • Robin Shen commented 6 years ago

    This is a good idea, and I would like to include this into 3.1. You may give it a try. Changes need to be done come into my mind right now:

    1. Add a setting to denote ldap attribute to be used as public keys into class LdapAuthenticator. It is something like existing User Email Attribute
    2. Add a field into class Authenticated to include returned public keys
    3. Compare existing public keys with retrieved public keys, and perform create/update/delete operations if necessary. You may refer to group syncing as an example. The code exists in class OneAuthorizingRealm

    For simplicity, I'd suggest not to add special flags for public keys retrieved from LDAP. As long as an user is authenticated via LDAP, and public key retrieval attribute is specified, we can sync all the public keys of the users with LDAP. Group membership is also handled this way right now. We may improve it if there is such requirement later.

  • Robin Shen changed fields 6 years ago
    Name Previous Value Current Value
    Assignee
    robin
    mweimann
  • Michael Weimann commented 6 years ago

    ✓ I have started working on that. It will be a real handy feature.

    @robin I would name the attribute User SSH Public Key with the description

    Specifies name of the attributes inside the user LDAP entry whose values will be taken as user SSH public keys. If this field is set SSH public keys are managed by LDAP only

  • Robin Shen commented 6 years ago

    This description is very clear, 👍

  • Michael Weimann commented 6 years ago
  • Michael Weimann commented 6 years ago

    Since the PR is merged this one is done?

  • OneDev changed state to 'Committed' 6 years ago
    Previous Value Current Value
    Open
    Committed
  • Robin Shen commented 6 years ago

    I created a psuedo commit (by editing missing-issue-fixes.md) to have this issue committed, and it will be closed when milestone 3.1 is released. Next time when merge pull request, we can use the squash merge strategy and provide a message fixing related issue.

  • OneDev changed state to 'Closed' 6 years ago
    Previous Value Current Value
    Committed
    Closed
issue 1/1
Type
New Feature
Priority
Normal
Assignee
Iterations
Issue Votes (0)
Watchers (2)
Reference
OD-102
Please wait...
Connection lost or session expired, reload to recover
Page is in error, reload to recover