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

Expected content of connectors config is not intuitive, add validation and documentation #42

Open
ca-scribner opened this issue Mar 8, 2022 · 1 comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request good first issue Good for newcomers

Comments

@ca-scribner
Copy link
Contributor

See discussion here. The connectors config implements the config like shown here, but it expects only the content inside the connectors key, not the entire connectors: [ ... ]. This is not intuitive and has caught a few users.

We should either improve the documentation or add validation around this. As the likely user mistake is that someone provides connectors: [ ... ] instead of just [ ... ], we could easily check for a connectors key with nested array and unpack it (and similarly make sure the array contains what looks like valid connectors (maybe checking for a type and id?).

@ca-scribner ca-scribner added documentation Improvements or additions to documentation enhancement New feature or request good first issue Good for newcomers labels Mar 8, 2022
@cjohnston1158
Copy link
Contributor

LDAP example:

cat << EOF > /tmp/dex-ldap.yaml
- type: ldap
  id: ldap
  name: LDAP
  config:
    host: ipa.example.com:636
    rootCAData: <base64 encoded CA file>
    bindDN: uid=admin,cn=users,cn=compat,dc=example,dc=com
    bindPW: password
    usernamePrompt: LDAP Username
    userSearch:
      baseDN: cn=users,cn=accounts,dc=example,dc=com
      filter: "(objectClass=person)"
      username: uid
      idAttr: uid
      emailAttr: mail
      nameAttr: cn
    groupSearch:
      baseDN: cn=groups,cn=accounts,dc=example,dc=com
      filter: "(objectClass=posixgroup)"
      userMatchers:
      - userAttr: uid
        groupAttr: memberUid
      - userAttr: DN
        groupAttr: member
      nameAttr: cn
EOF

and then:

juju config dex-auth connectors=@/tmp/dex-ldap.yaml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants