Documentation

(jvx:server:security)

Disabling REST Services

JVx REST services offer access to application functionality out of the box. It also contains some administrative services that are not included in your application. If you won't use these services, or won't use specific services, it's possible disable all or specific services.

You have following options:

In your deployment descriptor (web.xml), use init parameters:

<!-- Admin service are not available in general -->
<init-param>
  <param-name>adminservices.available</param-name>
  <param-value>false</param-value>
</init-param>
 
<!-- Admin service are available but only custom service registrations can be used. All standard admin services are disabled. -->
<init-param>
  <param-name>adminservices.enabled</param-name>
  <param-value>false</param-value>
</init-param>
 
<!-- Admin service with given NAME is disabled. This requires that admin services are available. -->
<init-param>
  <param-name>adminservice.NAME.enabled</param-name>
  <param-value>false</param-value>
</init-param>
 
<!-- Global setting: disable options service for storages. The storage service won't return metadata in this case. -->
<init-param>
  <param-name>service.storageMetaData.enabled</param-name>
  <param-value>false</param-value>
</init-param>

The StorageService itself has another option to configure REST services. It's possible to use a configuration object like this:

dbs = new DBStorage();
 
dbs.setDBAccess(getDataSource());
dbs.setWritebackTable("ADRESSEN");
dbs.open();
 
//Additional configuration for REST
StorageServiceConfig cfg = new StorageServiceConfig();
//Disable DELETE 
cfg.setOptionEnabled(Option.Delete, false);
//Disable OPTIONS (= MetaData)
cfg.setOptionEnabled(Option.MetaData, false);
 
dbs.putObject(StorageServiceConfig.class.getName(), cfg);
This website uses cookies for visitor traffic analysis. By using the website, you agree with storing the cookies on your computer.More information