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

[ready to merge] Refactor C2S / SASL / auth interface #828

Merged
merged 19 commits into from
Jun 29, 2016

Conversation

erszcz
Copy link
Member

@erszcz erszcz commented May 18, 2016

This PR introduces:

  • a mongoose_credentials type,
  • a sasl_mechanisms config option.

A single instance of mongoose_credentials corresponds to a single authentication/authorization request. The datatype is instantiated in ejabberd_c2s when the session is initially authenticated. It gathers all information obtained by the chosen SASL mechanism, which is later consumed by the auth backend(s). The auth backends might add more information (like session capabilities, validity period, etc.) when returning the credentials back to C2S - this information can e.g. come from decrypting an authorization token or from an external authorization service. The idea is to have all the bits and pieces of information in one place in order to enable extending the authentication process through hooks (no such hook is introduced in this PR yet).

The sasl_mechanisms option controls which mechanisms are started on MongooseIM startup as well as their startup order. It's a list of cyrsasl_* module names.

This is not intended for merging yet, as auth backends other than internal aren't ready. I just want to get feedback from Travis.

@erszcz erszcz changed the title [do not merge] Refactor C2S / SASL / auth interface [ready to merge] Refactor C2S / SASL / auth interface Jun 29, 2016
@michalwski michalwski merged commit 57a1b75 into master Jun 29, 2016
@michalwski michalwski deleted the esl-refactor-auth branch June 29, 2016 07:44
@michalwski michalwski mentioned this pull request Aug 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants