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

Add authentication support #51

Open
Manfred opened this issue Nov 4, 2019 · 2 comments
Open

Add authentication support #51

Manfred opened this issue Nov 4, 2019 · 2 comments

Comments

@Manfred
Copy link
Collaborator

Manfred commented Nov 4, 2019

Most applications use some form of authentication so it's probably useful to add some sort of mechanism to PerfCheck to select a role and/or user for authentication.

I think we want to pass the role as a string so the target application can resolve it in a useful way. In the context of this issue I don't care how the target application does this.

perf_check --user-role admin /manage/users

For selecting a specific user we also want to accept a string.

perf_check --user [email protected] /dashboard
perf_check --user 5543453 /dashboard

We can also limit the API surface by forcing users to encode their user scheme into some sort of serialized form.

perf_check --user company:12,user:5 /dashboard
perf_check --user role=admin /admin/board

Internally we can call this options.user or option.authenticated_user for extreme clarity. Eventually it should be replaced by options.cookie or options.headers.

@sudara
Copy link
Member

sudara commented Nov 4, 2019

This all sounds very sane. I'd love to reduce the amount of custom definitions currently needed in the before callbacks.

@Manfred
Copy link
Collaborator Author

Manfred commented Nov 4, 2019

Do you prefer options.user or options.authenticated_user and should we have a separate configuration for user roles?

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