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

User authentication feature #46

Open
CHukioo opened this issue Dec 12, 2018 · 10 comments
Open

User authentication feature #46

CHukioo opened this issue Dec 12, 2018 · 10 comments

Comments

@CHukioo
Copy link

CHukioo commented Dec 12, 2018

I really like OpenTest so far. I have request tough, is there any chance to add user control over the UI? For example: user that can create sessions and see results, user that can only preview the results... etc.

@adrianth adrianth changed the title User control User authentication feature Dec 12, 2018
@adrianth
Copy link
Contributor

I know there is a need for a way to let users view test execution results without the ability to start and cancel test sessions, basically to have a "read only" view of the current and past test session execution results. If this is what you need, we are planning to implement a feature to allow for this. Please note that this is most probably going to be implemented differently than through a user authentication feature, because proper authentication can only be implemented over HTTPS, and most people don't want to go though the trouble of setting up a domain for the OpenTest server and buying (and maintaining) a certificate. The way we're thinking to do this initially is to have a configuration parameter for the OpenTest server that instructs the server to start in read-only mode. This way, you can run two instances of the server: a read-write one for the test automation engineers, DevOps people, etc., and a read-only one for managers and anyone that needs to keep up to date with test execution results. The read-only instance will run on a different port, which you can expose that to the "public". The read-write instance will run on a port that is not accessible from outside. The OpenTest server is a really lightweight application, so running two instances is not going to cause any performance or resource depletion issues. Does that sound like something that would solve your problem?

@CHukioo
Copy link
Author

CHukioo commented Dec 12, 2018

Yes, that's perfect. If i setup the Jenkins and OpenTest on the same machine, i think i can trigger the tests from Jenkins.

@mcdcorp mcdcorp deleted a comment from CHukioo Dec 12, 2018
@adrianth
Copy link
Contributor

Yes, you can trigger a test session using the web API or, even better, using the command line. The command line option was added in the latest version and is still not documented, but here's the gist of it:

opentest session create --template dir1/Template1 --wait --out junit.xml

The --wait option tells the command to wait until the test session completes before returning, which is what you want when you run from Jenkins. The --out option specifies the name of the file where the test execution results are going to be generated. The results file is using the JUnit XML format, which is supported in Jenkins and other CI tools.

@galegor
Copy link

galegor commented Apr 17, 2019

@adrianth Hi, is it possible for you to estimate when this feature could be included?
I would add the option of not sharing logs in this read-only instance. In many cases, SQL queries or other sensitive data can be found there, DB users or even more goodies, if passwords are not encoded.

@adrianth
Copy link
Contributor

@galegor Yes, logs can definitely contain sensitive information, so non-privileged users shouldn't have access to them. My estimation is that it'll take about three weeks for this feature to be implemented, but that also depends on what dependencies and hurdles will surface during development that I am not aware of.

@galegor
Copy link

galegor commented Jul 17, 2019

Hey @adrianth I was wondering if the above feature is planned to be released any soon?

@galegor
Copy link

galegor commented Jul 17, 2019

Noticed that some code is already there to support this feature like this constant in ui.ts
const isReadOnlyRouter = options.readOnly || false;

@adrianth
Copy link
Contributor

Yes, the code is already there, and the feature will be available with the next release. I was planning to include more things in the next release, that's why I haven't published it yet, but let me know if you need this feature soon, and I can publish a new release at the end of this week.

@galegor
Copy link

galegor commented Jul 17, 2019

We need this feature as soon as possible and it would be excellent if you could release it this week

@adrianth
Copy link
Contributor

The feature is now ready to use in the latest version of OpenTest (1.1.2). The implementation will not require you to run two instances of the server, but simply set the readOnlyPort parameter in the server.yaml file. For example:

readOnlyPort: 3005

A read-only view of the OpenTest web UI will be made available on the port specified.

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