Consola de AdministradorGestión de Usuarios

Programa una sincronización

Para las organizaciones que utilizan el ILC del Conector de Directorio, las sincronizaciones automáticas pueden programarse en intervalos definidos como una alternativa al uso del ajuste de Intervalo de la aplicación de escritorio. Esto es particularmente útil en entornos sin cabeza, o en circunstancias donde una aplicación de escritorio no puede dejarse funcionando en segundo plano.

Para programar sincronizaciones, use Cron en entornos similares a Unix, incluyendo Linux y MacOS, y use Programador de Tareas en entornos de Windows:

Cron permissions

When running a cron job, we recommend doing so as a dedicated Directory Connector user. Create a bwdc user if you haven't already, and add that user to the etc/cron.allow list. This will allow a non-Root user to set up and run cron jobs.

In order to continue, you will also need your organization's API key client_id and client_secret, which can be obtained by an organization owner from the Web Vault by navigating to organization SettingsMy Organization.

Setup a sync script

In order avoid session timeouts, we recommend creating a shell script to run through cron. This script should securely read your client_secret to complete the login, and run a bwdc sync command that writes output to bwdc.log.

consejo

Need to sync from multiple directories? In your sync script, you can specify multiple folders, each of which must contain a data.json file with your directory sync settings.

You can then specify each directory to sync by performing multiple bwdc sync operations, for example:

Bash
BITWARDENCLI_CONNECTOR_APPDATA_DIR="./instance-1" bwdc sync BITWARDENCLI_CONNECTOR_APPDATA_DIR="./instance-2" bwdc sync

Setup the cron job

As the permitted bwdc user:

  1. Edit the user's crontab file by entering crontab -e in the terminal, or as edit the crontab file as any user by entering crontab -u <bwdc_username> -e.

  2. Add a line to the crontab that includes:

    • A scheduling expression that will determine the time/recurrence interval on which to execute the desired command (for example, 0 0 * * 2 to run every Tuesday at midnight).

    • The command to execute at the specified time/recurrence interval. In this case, execute the previously created sync script (for example, bwdcSyncService.sh):

For example, to run the sync script every Monday at 12:00:

Bash
# 0 12 * * 1 bwdcSyncService.sh

Cron job scheduling expressions

Use the following reference when scheduling syncs via cron to ensure you're scheduling them for the desired time:

Bash
# ┌───────────── minute (0 - 59) # │ ┌───────────── hour (0 - 23) # │ │ ┌───────────── day of the month (1 - 31) # │ │ │ ┌───────────── month (1 - 12) # │ │ │ │ ┌───────────── day of the week (0 - 6) (Sunday to Saturday; # │ │ │ │ │ 7 is also Sunday on some systems) # │ │ │ │ │ # │ │ │ │ │ # * * * * * <command to execute>
consejo

If you're not yet comfortable with cron job scheduling expressions, check out https://crontab.guru/ for help.

Please note, this is a third-party resource that is not operated or maintained by Bitwarden.

Task Scheduler permissions

When running a task, we recommend doing so as a dedicated Directory Connector user. Create a bwdc user if you haven't already.

In order to continue, you will also need your organization's API key client_id and client_secret, which can be obtained by an organization owner from the Web Vault by navigating to organization SettingsMy Organization.

Setup a sync script

In order to avoid session timeouts, you will need to create a script to run as the Task Scheduler action. This script should securely read your client_secret to complete the login, and run a bwdc sync command that writes output to bwdc.log.

consejo

Need to sync from multiple directories? In your sync script, you can specify multiple folders, each of which must contain a data.json file with your directory sync settings.

You can then specify each directory to sync by performing multiple bwdc sync operations, for example:

Bash
BITWARDENCLI_CONNECTOR_APPDATA_DIR="./instance-1" bwdc sync BITWARDENCLI_CONNECTOR_APPDATA_DIR="./instance-2" bwdc sync

Create a task

As the dedicated bwdc user:

  1. Open Task Scheduler and select Create Task from the Actions menu.

  2. Configure the task with the following security options:

    • Set the task to use the created bwdc user.

    • Set the task to Run whether user is logged on or not.

  3. Select the Triggers tab and select the New... button to create a trigger that fits your directory sync needs.

    consejo

    For example, you could create a weekly trigger that runs at 8:00 PM every Sunday or every week:

    Using Task Scheduler
    Using Task Scheduler

  4. Select the Actions tab and select the New... button to create an action that runs the created sync script.

  5. Select OK to finish creating the scheduled task.

Hacer una sugerencia a esta página

Contacte con nuestro equipo de asistencia

Para cuestiones técnicas, de facturación y de productos.

Nombre*
Correo electrónico de la cuenta Bitwarden*
Verificar el correo electrónico de la cuenta*
Producto*
¿Se aloja usted mismo?*
Asunto*
Mensaje...*

Estado de la nube

Comprobar estado

© 2024 Bitwarden, Inc. Términos Privacidad Ajustes de Cookies Mapa del sitio

Go to EnglishStay Here