Skip to content

Commit

Permalink
feat(jans-linux-setup): enable agama engine by default (#4131)
Browse files Browse the repository at this point in the history
* feat(jans-linux-setup): enable agama engine by default #4130

* docs: update docs to reflect engine availability udpate #4130

* chore: make agama bridge script enabled by default #4130
  • Loading branch information
jgomer2001 authored Mar 13, 2023
1 parent 2a7c1b8 commit 7e432dc
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 14 deletions.
12 changes: 9 additions & 3 deletions docs/admin/developer/agama/engine-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ tags:

# Agama engine configuration

The [engine](README.md#agama-engine) is a piece of software in charge of parsing flows written in Agama DSL and put them into action. Some aspects of the engine are configurable and this is integral part of the general authentication server's JSON configuration. To learn how to perform changes in the server's configuration click [here](../../config-guide/jans-cli/im/im-jans-authorization-server.md).
The [engine](README.md#agama-engine) is a piece of software in charge of parsing flows written in Agama DSL and put them into action. Some aspects of the engine are configurable and they are part of the general authentication server's JSON configuration - specifically the section labeled `agamaConfiguration`. To learn how to perform changes in the server's configuration click [here](../../config-guide/jans-cli/im/im-jans-authorization-server.md).

The properties of Agama engine configuration are described in the following:

- `enabled`: A boolean value that specifies if the engine is enabled. Default value is `false`
- `enabled`: A boolean value that specifies if the engine is enabled. Read more about [engine availability](#engine-availability) below

- `templatesPath`: A path relative to `/opt/jans/jetty/jans-auth/server/agama` that servers as the root of Agama flow pages. Default value is `/ftl`

Expand All @@ -35,4 +35,10 @@ The properties of Agama engine configuration are described in the following:
- `defaultResponseHeaders`: A JSON object : {
"Expires": "0"
}-->
## Engine availability

By default the engine is enabled. It might be the case your administrator temporarily disabled Agama. Do the following to restore its availability:

- Enable Agama bridge script. You can find details on how to manage custom scripts in [this](../../config-guide/jans-cli/im/im-custom-scripts.md) page. Here, set property `enabled` to `true` and increase `revision` value by one
- Set `enabled` property in Agama configuration to `true`. This is the property listed above in this page
2 changes: 1 addition & 1 deletion docs/admin/developer/agama/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ Disable the flow. It will still be callable from other flows.

### Updates in a flow's code are not reflected in its execution

Ensure the engine is [enabled](./quick-start.md#enable-the-engine). Use the REST API (PUT method) to [update](./lifecycle.md#flow-updates) the flow's code. Wait one minute and then retrieve (GET) this flow's data. The property `codeError` in the response should have the cause.
Ensure the engine is [enabled](./engine-config.md#engine-availability). Use the REST API (PUT method) to [update](./lifecycle.md#flow-updates) the flow's code. Wait one minute and then retrieve (GET) this flow's data. The property `codeError` in the response should have the cause.

### Why are the contents of a list or map logged partially?

Expand Down
7 changes: 0 additions & 7 deletions docs/admin/developer/agama/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,6 @@ In this page a high-level overview of the flow development process is presented.

These are key concepts to keep in mind before starting.

### Enable the engine

Ensure the Agama engine is enabled in your installation. Do the following:

- Enable Agama bridge script. You can find details on how to manage custom scripts in [this](../../config-guide/jans-cli/im/im-custom-scripts.md) page. Here, set property `enabled` to `true` and increase `revision` value by one
- Set `enabled` property in Agama configuration to `true`. This is located in the `agamaConfiguration` section of the [auth server configuration](../../config-guide/jans-cli/im/im-jans-authorization-server.md)

### Flow data

Every flow has some associated information. At minimum this is required:
Expand Down
2 changes: 1 addition & 1 deletion jans-auth-server/server/conf/jans-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@
"deviceAuthzTokenPollInterval": 5,
"deviceAuthzResponseTypeToProcessAuthz": "code",
"agamaConfiguration": {
"enabled": false,
"enabled": true,
"templatesPath": "/ftl",
"scriptsPath": "/scripts",
"serializerType": "KRYO",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@
"redirectUrisRegexEnabled": true,
"useHighestLevelScriptIfAcrScriptNotFound": true,
"agamaConfiguration": {
"enabled": false,
"enabled": true,
"templatesPath": "/ftl",
"scriptsPath": "/scripts",
"serializerType": "KRYO",
Expand Down
2 changes: 1 addition & 1 deletion jans-linux-setup/jans_setup/templates/scripts.ldif
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ description: Agama Script
displayName: agama
inum: BADA-BADA
jansConfProperty: {"value1":"cust_param_name","value2":"agama_flow","hide":false,"description":""}
jansEnabled: false
jansEnabled: true
jansLevel: 10
jansModuleProperty: {"value1":"usage_type","value2":"interactive","description":""}
jansModuleProperty: {"value1":"location_type","value2":"db","description": ""}
Expand Down

0 comments on commit 7e432dc

Please sign in to comment.