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

Ability to choose smtp identifier in email enrollment event #2452

Closed
brunocascio opened this issue Oct 16, 2020 · 3 comments · Fixed by #2461
Closed

Ability to choose smtp identifier in email enrollment event #2452

brunocascio opened this issue Oct 16, 2020 · 3 comments · Fixed by #2461
Labels
Type: Feature request A change requested or proposed by a user which is not on the default roadmap
Milestone

Comments

@brunocascio
Copy link
Contributor

brunocascio commented Oct 16, 2020

Is your feature request related to a problem? Please describe.

We need to set SMTP config per realm due we use multiple brands and we don't want to use the same for example, SMTP sender.

Describe the solution you'd like

Add a field in the event framework to override the global configuration from privacyidea config 'email.identifier'

image

Alternative solution

Use additional_params field?

Additional context
We're using keycloak as a centralized solution for authentication. We have 2 clients (foo.com and bar.com)
Each client want to send email with their smtp configuration.

@cornelinux
Copy link
Member

Gahh! You want to use email tokens? Evil! Very specific.
And you think you need to autoenroll these tokens to the users?

The options of the tokenhandler are defined here:
https://github.com/privacyidea/privacyidea/blob/master/privacyidea/lib/eventhandler/tokenhandler.py#L169

So you could add something like this:

"smtp_server": {
                            "type": "bool",
                            "visibleIf": "tokentype",
                            "visibleValue": "sms",
                            "description": _("The server which will be used to send email-tokens."),
                            "value": smtp_server_list
                        },

You could get the "smtp_server_list" from lib/smtpserver.py:get_smtpservers().

@cornelinux cornelinux added the Type: Feature request A change requested or proposed by a user which is not on the default roadmap label Oct 21, 2020
@Jameru
Copy link
Contributor

Jameru commented Oct 21, 2020

I just made a fairly naive implementation for this feature. If there is any feedback it'd be appreciated :)

@brunocascio
Copy link
Contributor Author

Hey folks @cornelinux @Jameru,

I think @Jameru's pull request works pretty well for the feature requested.

I'm glad to collaborate if needed 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature request A change requested or proposed by a user which is not on the default roadmap
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants