11. Gentics .Node PortalConnector WebService

11.1. Introduction

This section is the documentation for the Gentics .Node PortalConnector WebService configuration. The Gentics .Node PortalConnector WebService provides access to datasources defined in Gentics Portal.Node using web services.

11.2. Configuration

11.2.1. Web Services Configuration File

The web services configuration file for Gentics .Node PortalConnector WebService can be found at ${com.gentics.portalnode.confpath}/webservices/configuration.properties and is in the Java properties format. When this file does not exist at the startup of Gentics .Node PortalConnector WebService , a new one is created with the default settings (no access allowed).

11.2.1.1. General properties

With the general properties, the authentication type and default access can be configured.

11.2.1.1.1. defaultProtected

Defines whether access is allowed or forbidden to web services unless defined otherwise. Set to true (default) to deny and to false to allow access.

11.2.1.2. WebService configuration

Configuration of the access properties for web services. Web services are accessed using URLs. Each URL is constructed as ws-path/servicename[/additional-pathinfo] (additional-pathinfo is optional). For Gentics .Node PortalConnector WebService , the servicename is datasource and the additional-pathinfo is the datasource id.

11.2.1.2.1. webservice.protected

Overwrite the general value for defaultAccess to set the protection for access to the listing of all existing web services.

11.2.1.2.2. webservice.role

Set the required userrole to access the listing of all existing web services.

11.2.1.2.3. webservice.datasource.protected

Overwrite the general value for defaultAccess to set the protection for general access to the datasource web service.

11.2.1.2.4. webservice.datasource.role

Set the required userrole for general access to the datasource web service. This protects access to the *.wsdl file defining the datasource. Access to specific datasources can be configured differently.

11.2.1.2.5. webservice.datasource.[datasourceid].protected

Overwrite the general value for defaultAccess . If set to true , the datasource is protected and only users with appropriate roles may access the datasource. If set to false , the datasource is not protected and everybody may access it.

11.2.1.2.6. webservice.datasource.[datasourceid].role

Define the roles that grant access to the datasource [datasourceid]. Users must have at least one of the given roles to access this datasource over the webservice, when the datasource is protected.

11.2.2. User configuration

The users are configured in the file ${com.gentics.portalnode.confpath}/users.properties.

11.2.2.1. user.[login].password

Defines a user and sets a password (which may be empty).

11.2.2.2. user.[login].role

Comma separated list of roles the user incorporates. The user will have access to web services that are assigned at least one of the user's roles.

11.2.3. Configuration Example

The following example defines the user adminuser with password password and roles admin and manager . The user will have access to all three configured datasources, since two have appropriate roles and the third is unprotected.

Example 3.21. Example for ${com.gentics.portalnode.confpath}/users.properties

# user configuration
user.adminuser.password=password
user.adminuser.rule=admin,manager
                        

Example 3.22. Example for ${com.gentics.portalnode.confpath}/webservices/configuration.properties

# per default everything is protected
defaultProtected=true

# webservice configuration

# everybody may list the existing webservices
webservice.protected=false

# access to the .wsdl for the datasource webservice only for admins
webservice.datasource.role=admin

# set the protection for specific datasources
webservice.datasource.protecteddatasource.role=admin
webservice.datasource.unprotecteddatasource.protected=false
webservice.datasource.managerdatasource.role=manager,user