Legacy Security Authentication Administration API¶
- Legacy Security Authentication Administration API
- Configuration
- API Routes
- List the Current Set of Domain Types
- Request the Details of a Specific Domain Type
- Create a New Domain Type
- Update an Existing Domain Type
- Delete an Existing Domain Type
- List the Current Set of Domains
- Request the Details of a Specific Domain
- Create a New Domain Type
- Update an Existing Domain
- Delete an Existing Domain
The Legacy Security Authentication Administration API is a sub-module of Administration REST API which allows to communicate with FWD server using REST from an application for administering the 4GL security tables. These are the _sec-authentication-system and _sec-authentication-domain meta tables. For each table, a set of APIs are exposed, the paths reflecting the CRUD operations.
Note: The work on this feature was implemented in #8976.
Configuration¶
Enable the Legacy Security Authentication Administration API¶
To enable the Legacy Security Authentication Administration API, the Administration REST API must be enabled. See the Administration REST API for instruction how this is achieved and how the admin user is created. If needed, specialized administrators can be created for the security tables.
The REST API is enabled immediately after adding the ACLs in directory and restarting the FWD server. The ACLs can be configured for each combination of HTTP method and context path.
Add Permissions for the Legacy Security Authentication Administration API¶
In order to have access to the administration API, you need to add permissions. This is done via ACLs, in the directory, under the acl/webservice node.
To authorize the admin-rest to access _sec-authentication-domain, add the following nodes:
<node class="container" name="002100">
<node class="resource" name="resource-instance">
<node-attribute name="reference" value="ADMIN:GET:/admin/security/domains/.*"/>
<node-attribute name="reftype" value="FALSE"/>
</node>
<node class="webServiceRights" name="rights">
<node-attribute name="allow" value="true"/>
</node>
<node class="strings" name="subjects">
<node-attribute name="values" value="admin-rest"/>
</node>
</node>
<node class="container" name="002400">
<node class="resource" name="resource-instance">
<node-attribute name="reference" value="ADMIN:POST:/admin/security/domains/.*"/>
<node-attribute name="reftype" value="FALSE"/>
</node>
<node class="webServiceRights" name="rights">
<node-attribute name="allow" value="true"/>
</node>
<node class="strings" name="subjects">
<node-attribute name="values" value="admin-rest"/>
</node>
</node>
<node class="container" name="002600">
<node class="resource" name="resource-instance">
<node-attribute name="reference" value="ADMIN:PUT:/admin/security/domains/.*"/>
<node-attribute name="reftype" value="FALSE"/>
</node>
<node class="webServiceRights" name="rights">
<node-attribute name="allow" value="true"/>
</node>
<node class="strings" name="subjects">
<node-attribute name="values" value="admin-rest"/>
</node>
</node>
<node class="container" name="002800">
<node class="resource" name="resource-instance">
<node-attribute name="reference" value="ADMIN:DELETE:/admin/security/domains/.*"/>
<node-attribute name="reftype" value="FALSE"/>
</node>
<node class="webServiceRights" name="rights">
<node-attribute name="allow" value="true"/>
</node>
<node class="strings" name="subjects">
<node-attribute name="values" value="admin-rest"/>
</node>
</node>
To authorize the admin-rest to access _sec-authentication-system, add the following nodes:
<node class="container" name="001100">
<node class="resource" name="resource-instance">
<node-attribute name="reference" value="ADMIN:GET:/admin/security/domain-types/.*"/>
<node-attribute name="reftype" value="FALSE"/>
</node>
<node class="webServiceRights" name="rights">
<node-attribute name="allow" value="true"/>
</node>
<node class="strings" name="subjects">
<node-attribute name="values" value="admin-rest"/>
</node>
</node>
<node class="container" name="001400">
<node class="resource" name="resource-instance">
<node-attribute name="reference" value="ADMIN:POST:/admin/security/domain-types/.*"/>
<node-attribute name="reftype" value="FALSE"/>
</node>
<node class="webServiceRights" name="rights">
<node-attribute name="allow" value="true"/>
</node>
<node class="strings" name="subjects">
<node-attribute name="values" value="admin-rest"/>
</node>
</node>
<node class="container" name="001600">
<node class="resource" name="resource-instance">
<node-attribute name="reference" value="ADMIN:PUT:/admin/security/domain-types/.*"/>
<node-attribute name="reftype" value="FALSE"/>
</node>
<node class="webServiceRights" name="rights">
<node-attribute name="allow" value="true"/>
</node>
<node class="strings" name="subjects">
<node-attribute name="values" value="admin-rest"/>
</node>
</node>
<node class="container" name="001800">
<node class="resource" name="resource-instance">
<node-attribute name="reference" value="ADMIN:DELETE:/admin/security/domain-types/.*"/>
<node-attribute name="reftype" value="FALSE"/>
</node>
<node class="webServiceRights" name="rights">
<node-attribute name="allow" value="true"/>
</node>
<node class="strings" name="subjects">
<node-attribute name="values" value="admin-rest"/>
</node>
</node>
API Routes¶
Related to _sec-authentication tables, there are ten exposed APIs which provide basic CRUD operations for the two meta tables. The first five APIs handle the management of domain types, stored in _sec-authentication-system meta table.
List the Current Set of Domain Types¶
| API | GET https://localhost:7443/admin/security/domain-types/<database> |
|---|---|
| Header | Must include authorization: the FwdSessionId from a previous login call. |
| Body | No body required. |
| Response | The response contains the list of domain types defined for the requested database. For example, the default 4GL setup will return: |
Request the Details of a Specific Domain Type¶
| API | GET https://localhost:7443/admin/security/domain-types/<database>/<domain-type> |
|---|---|
| Header | Must include authorization: the FwdSessionId from a previous login call. |
| Body | No body required. |
| Response | The response contains the list of domain types defined for the requested database. For example, the details on same database of a default 4GL setup for _oeusertable domain may return:Note the JSON attributes are the 4GL legacy field names. |
Create a New Domain Type¶
| API | POST https://localhost:7443/admin/security/domain-types/<database> |
|---|---|
| Header | Must include authorization: the FwdSessionId from a previous login call. |
| Body | The body is a JSON with all fields required. If a field is not present, the default 4GL value (as defined with INITIAL option) will be used. The order is irrelevant.Here is an example of body for creating a new domain type named my-domain-type. |
| Response | The response contains a single flag with the success of the operation. If all goes well, we have: |
Update an Existing Domain Type¶
| API | PUT https://localhost:7443/admin/security/domain-types/<database>/<domain-type-name> |
|---|---|
| Header | Must include authorization: the FwdSessionId from a previous login call. |
| Body | The body is a JSON with all fields to be altered. If a field is not present, it will NOT be updated. The order is irrelevant. Here is an example of body for changing only the description and the name of an existing domain type named my-domain-type. |
| Response | The response contains a single flag with the success of the operation. If something is not fine (for example, the domain type was not found in database), we have: |
Delete an Existing Domain Type¶
| API | DELETE https://localhost:7443/admin/security/domain-types/<database>/<domain-type> |
|---|---|
| Header | Must include authorization: the FwdSessionId from a previous login call. |
| Body | No body required. |
| Response | The response contains a single flag with the success of the operation. If something is not fine (for example, the domain type was not found in database), we have: |
Next five APIs handle the management of actual domain, stored in _sec-authentication-domain meta table.
List the Current Set of Domains¶
| API | GET https://localhost:7443/admin/security/domains/<database> |
|---|---|
| Header | Must include authorization: the FwdSessionId from a previous login call. |
| Body | No body required. |
| Response | The response contains the list of domains defined for the requested database. For example, the default 4GL setup will return: |
Request the Details of a Specific Domain¶
| API | GET https://localhost:7443/admin/security/domains/<database>/<domain-name> |
|---|---|
| Header | Must include authorization: the FwdSessionId from a previous login call. |
| Body | No body required. |
| Response | The response contains the list of domains defined for the requested database. For example, the details on same database of a default 4GL setup for default domain may return:Note the JSON attributes are the 4GL legacy field names. |
Create a New Domain Type¶
| API | POST https://localhost:7443/admin/security/domains/<database> |
|---|---|
| Header | Must include authorization: the FwdSessionId from a previous login call. |
| Body | The body is a JSON with all fields required. If a field is not present, the default 4GL value (as defined with INITIAL option) will be used. The order is irrelevant.Here is an example of body for creating a new domain named dom0. |
| Response | The response contains a single flag with the success of the operation. If all goes well, we have: |
Update an Existing Domain¶
| API | PUT https://localhost:7443/admin/security/domains/<database>/<domain-name> |
|---|---|
| Header | Must include authorization: the FwdSessionId from a previous login call. |
| Body | The body is a JSON with all fields to be altered. If a field is not present, it will NOT be updated. The order is irrelevant. Here is an example of body for changing only the description and the name of and domain type for dom0. |
| Response | The response contains a single flag with the success of the operation. If something is not fine (for example, the domain was not found in database), we have: |
Delete an Existing Domain¶
| API | DELETE https://localhost:7443/admin/security/domains/<database>/<domain-name> |
|---|---|
| Header | Must include authorization: the FwdSessionId from a previous login call. |
| Body | No body required. |
| Response | The response contains a single flag with the success of the operation. If something is not fine (for example, the domain was not found in database), we have: |
© 2025 Golden Code Development Corporation. ALL RIGHTS RESERVED.