> Source: https://docs.cyberelements.io/bastion/4.7/el/Usage/Administration/AdminConsole/MainWorkPanel/AccessPolicies/Workflows/

# Workflow

**Workflow** handles the accesses that are not granted in advance. An application marked **restricted** in its [access contract](https://docs.cyberelements.io/bastion/4.7/el/Usage/Administration/AdminConsole/MainWorkPanel/AccessPolicies/AccessContracts/) is not launched directly: the user **requests** it from their portal, and an **approver** grants or denies it here. Granting produces a workflow, attached to the user / application pair, with optional time restrictions.

Workflow allows a **one-off** access to be opened without creating and then deleting a contract every time.

## Use cases

- the access is **exceptional**: an intervention, an on-call shift, a repair;
- it must be **traced by name**, with a requester, an approver and a date;
- it must **expire by itself**, with no later intervention.

A permanent access belongs to the contract, not to workflow.

![](https://docs.cyberelements.io/bastion/4.7/img/cyberelements/CYE_AdminConsole_Workflow_Module.png)

## Module tabs

The three tabs follow the life cycle of a request:

- **Workflow**: the accesses already granted, and when they end;
- **User requests**: pending, accepted or refused requests (the day-to-day working tab);
- **History**: the record of what happened.

The **History** tab is new in 4.7.

The **Workflow** tab:

![](https://docs.cyberelements.io/bastion/4.7/img/cyberelements/CYE_AdminConsole_Workflow_Workflows.png)

The **History** tab shows each request with its latest event: request, refusal, acceptance, automatic removal or manual deletion.

![](https://docs.cyberelements.io/bastion/4.7/img/cyberelements/CYE_AdminConsole_Workflow_History.png)

## Approvers

The approver is an administrator of the console, or a delegated administrator who belongs to a [delegated administrator group](https://docs.cyberelements.io/bastion/4.7/el/Usage/Administration/AdminConsole/MainWorkPanel/AuthenticationDomains/AdministratorGroups/), the group that designates the approvers of access requests.

### Approvers per application

The **Workflows** tab of an application, privileged or standard, designates the delegated administrators who see and handle the access requests and workflows of that application. The **Delegated administrators authorised to handle workflows related to this application** field offers three values:

![](https://docs.cyberelements.io/bastion/4.7/img/cyberelements/CYE_AdminConsole_Applications_Workflows_Modes.png)

| Value | Effect |
|---|---|
| **No delegated administrator** | Only the console administrators handle the application's requests. |
| **All delegated administrators** | Any delegated administrator handles the application's requests. |
| **Specify advanced permissions...** | Only the members of the groups chosen under **Advanced permissions** (**Delegated administrator groups** list, domain by domain) handle the application's requests. |

A new application is set to **No delegated administrator**; an application that existed before the upgrade to 4.7 is set to **All delegated administrators**, which keeps the previous behaviour. The setting is also carried by the CSV import/export of applications and by the public API.

With advanced permissions, the authorised groups go to the right-hand list, domain by domain:

![](https://docs.cyberelements.io/bastion/4.7/img/cyberelements/CYE_AdminConsole_Applications_Workflows_AdvancedPermissions.png)

Use case: entrust the team that administers a scope (a site, a server fleet) with approving the accesses to its own applications only, without opening the other teams' requests to it. The groups are declared on the authentication domain of the delegated administrators, the default local domain included.

A delegated administrator only sees a request or a workflow if it covers at least one application they can handle, and only sees those applications in it. When they accept, refuse or delete a request that also covers other applications, their action only applies to their own: the rest of the request stays pending, in a separate request they do not see.

## User notification

The user can receive an email when their request is accepted or refused. Sending is enabled in the **Workflow** section of the [general options](https://docs.cyberelements.io/bastion/4.7/el/Usage/Reference/AdminConsole/GeneralOptions/#workflow), which also sets the SMTP server and the sender. When sending their request, the user portal shows the address the answer will be sent to, or warns that their address could not be retrieved.

## Prerequisites

Workflow is not switched on from this module. It assumes:

1. an application declared **restricted** in an [access contract](https://docs.cyberelements.io/bastion/4.7/el/Usage/Administration/AdminConsole/MainWorkPanel/AccessPolicies/AccessContracts/);
2. a way of notifying the approver that a request is waiting: a [notification profile](https://docs.cyberelements.io/bastion/4.7/el/Usage/Administration/AdminConsole/MainWorkPanel/AccessPolicies/NotificationProfiles/) and an [SMTP server](https://docs.cyberelements.io/bastion/4.7/el/Usage/Administration/AdminConsole/ConfigurationWorkPanel/SmtpServers/).

> **Requests without notification**
>
> Nothing signals a pending request outside this tab: no banner, no counter elsewhere in the console. If no notification profile covers the event, the request waits until an approver opens the module, and the user has no way of knowing the status of their request.

## Limits

- A workflow applies to a **user / application pair**: it cannot be granted to a group, nor to a category of applications.
- It **adds** a right, it removes none: denying a request does not restrict accesses already granted elsewhere.
- A time restriction is optional: without one, the granted access does not expire on its own.

---

The details of the three tabs and their columns are in the [module reference](https://docs.cyberelements.io/bastion/4.7/el/Usage/Reference/AdminConsole/Workflows/).

The API endpoints that drive this object are described in the API reference: [approval workflows](https://docs.cyberelements.io/bastion/4.7/el/API/APIGuide/#get-/publicapi/-org-/workflowwrappers/) and [access requests](https://docs.cyberelements.io/bastion/4.7/el/API/APIGuide/#get-/publicapi/-org-/userrequests/).
