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

ssl config option for LDAP mapper has confusing values #7

Open
ivosh opened this issue Oct 16, 2014 · 6 comments
Open

ssl config option for LDAP mapper has confusing values #7

ivosh opened this issue Oct 16, 2014 · 6 comments

Comments

@ivosh
Copy link

ivosh commented Oct 16, 2014

The "ssl" configuration option for LDAP mapper can take the following values:

  • ssl
  • tls
  • on
  • off

based on the code in ldap_mapper.c

However documentation is not very clear what is the meaning of these values.
One could incorrectly assume (with the recent poodle attack) that ssl stands for "SSL 3.0" and tls stands for "TLS 1.x". This would be incorrect: ssl means in fact "LDAPS" and "tls" means "StartTLS".
Anyone involved with LDAP would immediately understand the exact meaning without examining source code for details.

So I suggest to rename "ssl" to "ldaps", "tls" to "starttls" or at least document these values properly.

@LudovicRousseau
Copy link
Member

Why not. The new code should not break existing configurations using ssl and tls in the configuration.

Can you propose a patch?

@ivosh
Copy link
Author

ivosh commented Oct 17, 2014

Before anything else I would like to reach an agreement what these configuration values actually mean.

  • "ssl" is actually "ldaps"
  • "tls" is actually "starttls"
  • "on" is the same as "ldaps"
  • "off" is plaintext

Is that correct?

@LudovicRousseau
Copy link
Member

No idea.You should check the source code.

@ivosh
Copy link
Author

ivosh commented Oct 18, 2014

Source code is pretty clear in ldap_mapper.c starting line 1143:

ssltls = scconf_get_str(blk,"ssl","off");
if (! strncasecmp (ssltls, "tls", 3))
ssl_on = SSL_START_TLS;
else if( ! strncasecmp (ssltls, "on", 2))
ssl_on = SSL_LDAPS;
else if( ! strncasecmp (ssltls, "ssl", 3))
ssl_on = SSL_LDAPS;

and default value at line 113:

static ldap_ssl_options_t ssl_on = SSL_OFF;

@LudovicRousseau
Copy link
Member

I could not find the documentation about ssl = ... configuration in doc/README.ldap_mapper
Maybe the best is to better document the configuration field ssl =in https://github.com/OpenSC/pam_pkcs11/blob/master/doc/pam_pkcs11.xml#L1824

Can you propose a patch?

@LudovicRousseau
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants