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

[WFLY-11340] Fix mp ot tests security manager #11879

Closed
wants to merge 2 commits into from

Conversation

@jstourac
Copy link
Contributor

jstourac commented Nov 22, 2018

https://issues.jboss.org/browse/WFLY-11340

As commented in linked issue, I am not sure about proper permission for the last test - SimpleRestClientTestCase. Any suggestion is welcomed.

Thanks for submitting your Pull Request!

Please make sure your PR meets the following requirements:

  • Pull Request title is properly formatted: [WFLY-XYZ] Subject or WFLY-XYZ Subject
  • Pull Request contains link to the JIRA issue(s)
  • Pull Request contains description of the issue(s)
    • too complicated description, can be seen in jira anyway
  • Pull Request does not include fixes for issues other than the main ticket
    • yes and no - there is an extra commit that adds license headers into the modified source files... I don't think it is worth to create separate issue for it though...
  • Attached commits represent units of work and are properly formatted
@jstourac

This comment has been minimized.

Copy link
Contributor Author

jstourac commented Nov 23, 2018

Retest this, please.

@jamezp jamezp self-assigned this Nov 26, 2018
@bstansberry bstansberry changed the title Fix mp ot tests security manager [WFLY-11340] Fix mp ot tests security manager Nov 26, 2018
Copy link
Member

jamezp left a comment

No need to make the immediate changes yet. I want to have a better look at this as ideally we don't ever need to add permissions like this to a test case. Obviously in some control cases that is a requirement, but I don't think in this case we want that. Again though I need to take a better look :)

/**
* Permissions required in case security manager is enabled.
*/
private static final String PERMISSIONS = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"

This comment has been minimized.

Copy link
@jamezp

jamezp Nov 26, 2018

Member

There is a utility for this. Have a look at this example.

@jamezp jamezp added the hold label Nov 26, 2018
@jstourac

This comment has been minimized.

Copy link
Contributor Author

jstourac commented Nov 27, 2018

@jamezp, Thank you for your review. I'll wait for your further investigation then. Let me know when you think I should amend this anyhow or want some information from me.

@bstansberry

This comment has been minimized.

Copy link
Contributor

bstansberry commented Nov 27, 2018

The java.security.AllPermission in the one test is the more troublesome one.

The others it seems the app is trying to open an HTTP client, so it's normal that permissions would be needed for that and the need is purely due to the behavior of the app; i.e. the app author's own decision. Setting that permission up in the optimal way is good, but the need for the permission isn't worrisome.

The AllPermission one though, it seems odd that a call to javax.ws.rs.client.ClientBuilder.newBuilder would require complex permissions, and granting AllPermission seems like it might be covering over a container problem.

@jamezp

This comment has been minimized.

Copy link
Member

jamezp commented Nov 27, 2018

I'm closing this as I created #11890. It's essentially the same only using the API and restricting the access in the SimpleRestClientTestCase to a smaller set.

@jamezp jamezp closed this Nov 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.