aerogear/aerogear-unifiedpush-server — pull request #408 by abstractj (2014-10-20 16:16:10+00:00)
Title: AGSEC-183 - UPS user management with Keycloak

@kpiwko @matzew @qmx @danielpassos @sebastienblanc @danbev @edewit You are all invited to review.

This PR contains several changes, so I would like to borrow your brain on it. It relates to https://github.com/aerogear/aerogear-unifiedpush-server/pull/399 and https://issues.jboss.org/browse/AGPUSH-697.

For testing:

Good morning, this is related with the super user Jira. For testing:

user: admin
password: 123
user: developer
password: developer

Flows to test:

Login as admin, create several applications, then logout. Login as developer and check if you can see admin's applications. (they should not be available to developer)
Login as developer, create several applications, then logout. Login as admin and check if you can see developer's and admin applications (they should be there)
Go to http://localhost:8080/auth/admin/aerogear/console/index.html# and try to login as admin
Go to http://localhost:8080/auth/admin/aerogear/console/index.html# and try to login as developer (it should be forbidden)

It contains:

- The application management for developer/admin profiles
- Refactoring to remove duplicates from the endpoints
- Producers to provide a centralized class to deal with multiple roles

One of the benefits which I can see here is: if we want to separate admin actions from regular developer actions, now it's pretty much possible.

Note:

1. I tested several workflows to guarantee that everything is working, but like a good human, something can be wrong.
2. This is not the super best API design, so feedback is welcome.
3. This pull-request should go into 1.0.x branch and master.