Hi German, please find my answers in-line.
Il 06/05/2013 12:01, German Parente ha scritto:
Hi all,
my managers want me to implement the scenario I will describe. I will
need some help to know how to address it.
I have an application which basically consists in a REST web service.
I have been asked to implement rbac feature to users connecting to the
web service. The application is running in a virtual machine that is
delivered to each customer asking for the product.
Precise questions:
1) I will have to deploy syncope in the virtual machine for each
customer using the product. Customer is not supposed to use the
console but an application must do the full initialization:
- cleaning default stuff (users/roles, etc).
You can avoid this step working onto the file
core/src/main/resources/content.xml.
This file specifies the content that have to be loaded at first db
initialization.
At startup time, Apache Syncope checks for syncope db tables: if no
content is found the content.xml file will be used to create the default
content.
You can create your own content.xml file by configuring and exporting
your default content via console:
1. deploy syncope (or start in embedded mode)
2. make your configuration via console
3. export the configuration via console (main tab Configuration)
- creating resource and connectors
- configure them
- add users in the IDM from backend by reconciliation or synchronization.
All initializing steps must be done by an application.
Is there any example of how to do this ? A full configuration done
from scratch where I could see how to achieve this ?
As far as I remember it shouldn't exist any example of how to do this.
You can take a look at integration tests [1]: looking into these pieces
of code you should be able to create your own configuration application.
Would it be better to use java api or rest interface ?
REST API.
2) I have to address from my application the RBAC module getting user
roles from syncope.
Again, what would be the best approach ? Use java api or bare rest
request calls ?
REST calls are the right way to do this.
Thanks a lot in advance,
German
[1]
http://svn.apache.org/viewvc/syncope/tags/syncope-1.1.1/core/src/test/java/org/apache/syncope/core/rest/