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

Provide user credentials #21

Open
1 of 3 tasks
jorgemoralespou opened this issue Mar 10, 2017 · 10 comments
Open
1 of 3 tasks

Provide user credentials #21

jorgemoralespou opened this issue Mar 10, 2017 · 10 comments

Comments

@jorgemoralespou
Copy link
Contributor

jorgemoralespou commented Mar 10, 2017

As many of the workshops provide information with user credentials which can not be repeated per attendee, I think it would be nice to have the following feature:

When you click in an event/workshop, if it's configured to provide credentials you would have an intermediate page that would provide those to you (Or maybe just display the credentials on the top banner and modify instructions accordingly to the credentials of the user). A cookie should be set so that the user will always get the same credentials.

Credentials could come from:

  • sequential username and fixed or sequential password (userxx)
  • from a file (for those environments configured with htpasswd)
  • from an oauth challenge, for those environments where they could use their google account
@jorgemoralespou
Copy link
Contributor Author

Still relevant. I can help with design, not with code, since now in Ruby :-P

@marekjelen
Copy link
Contributor

To enable this feature variable DYNAMIC_USER_NAME has to be defined.

User name will be USER_NAME variable suffixed with an auto-incrementing number.

If NUM_USERS variable is provided, the system will throw error when the generated number reaches the limit.

Password is static defined through the USER_PASSWORD variable.

@jorgemoralespou
Copy link
Contributor Author

I would rather get these values in new variables, and make it possible to reassign to the existing ones.

Something like:
DYNAMIC_USER_NAME=user%02d (format for the number)

The previous format would allow to have the number formatted to 2 digits, 3 digits, ... depending on the size of the workshop.

And then, in the regular vars for the workshop, we could use, re-assignment:
USER_NAME={{DYNAMIC_USER_NAME}}

PASSWORD for the time being, as it's being static, would be possible kept as it is.

These would prevent breaking changes when the option is activated.

@marekjelen
Copy link
Contributor

I like the idea with formatting, and IMHO OK to enforce it, so that

if DYNAMIC_USER_NAME is defined then USER_NAME is going to behave as a template as per

https://ruby-doc.org/core-2.5.0/Kernel.html#method-i-sprintf

with one argument being passed in.

@siamaksade
Copy link
Contributor

DYNAMIC_USER_NAME var would be both the format for generating usernames and also the generated username?

Why do we need to cap the number of usernames generated?

@marekjelen
Copy link
Contributor

DYNAMIC_USER_NAME is just a marker to enable the behaviour

USER_NAME has the format

You do not have to, if NUM_USERS is not provided or is 0 then it will go till it OOMs.

@siamaksade
Copy link
Contributor

I don't think NUM_USERS is needed to be implemented. It should just act as a counter. How many users are available is not really relevant to workshopper.

Would that be implemented using an embedded db?

@marekjelen
Copy link
Contributor

@marekjelen
Copy link
Contributor

what's the state on this @siamaksade @jorgemoralespou ?

@jorgemoralespou
Copy link
Contributor Author

@marekjelen, what do you mean? If this is still relevant? Yes. If there's been test? No, but if it's testable I'll go ahead and give feedback

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

No branches or pull requests

3 participants