duologsync (DLS) is a utility written by Duo Security that supports fetching logs from Duo endpoints and ingesting them to different SIEMs.
duologsync requires credentials for an Admin API application. Create this application before installation and configuration.
To create the Admin API application:
- Log into the Duo Admin Panel as an administrator with the Owner role.
- Navigate to Applications → Application Catalog, locate Admin API, and add the application.
- Copy the integration key, secret key, and API hostname. You'll need this information to update the
config.ymlfile later. - For a standard Duo account, grant Grant read log.
- For an MSP account, also grant Grant accounts - Read and Grant read log under Subaccount permissions. Separate Admin API applications are not required in child accounts.
- Optionally specify which IP addresses or ranges are allowed to use this Admin API application in Networks for API Access. If you do not specify any IP addresses or ranges, this Admin API application may be accessed from any network.
- Click Save.
For MSP log collection, use the parent account's Admin API credentials and set account.is_msp to True. DuoLogSync discovers subaccounts with the Admin API and sends each child request to the API hostname returned for that subaccount. The legacy Accounts API integration is no longer used. See Duo's Admin API subaccount documentation for current setup details.
Before running DuoLogSync, you must have a server configured to receive the logs. DuoLogSync sends logs over TCP, TCPSSL (TCP with SSL encryption), or UDP to a specified hostname and port. If no server is listening, the logs will be lost.
Common receiving systems include:
- SIEM platforms
- Syslog servers
- Log aggregators
Ensure the hostname and port in your config.yml match your receiving server's configuration. Refer to your SIEM or log server documentation for setup instructions.
Run all commands from the repository root. A virtual environment is recommended but optional.
-
Verify Python 3:
python --version
-
Optional but recommended: create and activate a virtual environment using the standard commands for your Python installation and shell.
python -m venv .venv
Skip this step to install into an existing Python environment.
-
Install DLS:
python -m pip install .Without a virtual environment, this installs into the selected Python environment. Its scripts directory must be on
PATH.Pip reads
setup.pyto install DLS, its dependencies, and theduologsynccommand. Do not runpython setup.py installdirectly. -
Verify the installed command:
duologsync --help
-
Create one local configuration:
- Regular account: copy
example_config.ymltoconfig.yml. - MSP parent account: copy
config_msp.ymltoconfig_msp.local.yml.
For a regular account, set
account.is_msp: Falseand use that account's Admin API credentials. For MSP, setaccount.is_msp: Trueand use the parent Admin API credentials. Never add credentials to trackedconfig_msp.yml.Replace all placeholders, configure the destination server and endpoints, protect the credential-bearing file, and start the destination before DLS.
- Regular account: copy
-
Run DLS with the complete path to the selected configuration:
duologsync CONFIG_PATH
Replace
CONFIG_PATHwith the complete path toconfig.ymlfor a regular account orconfig_msp.local.ymlfor MSP.DLS must run in UTC. If the host or service is not already in UTC, configure the process or service to use UTC.
For a complete end-to-end verification, follow Test DLS with no subaccounts or Test DLS with MSP subaccounts below.
- DuoLogSync is compatible with Python versions
3.6,3.7,3.8,3.9,3.10,3.11,3.12, and3.13. - DuoLogSync is supported on Linux, macOS, and Windows. The end-to-end local receiver examples below use POSIX shell commands; Windows users must use the equivalent PowerShell commands and writable Windows paths.
- A logging filepath can be specified in
config.yml. By default, logs will be stored under the/tmpfolder with nameduologsync.log. - These logs are only application/system logs, and not the actual logs retrieved from Duo endpoints.
- Current version supports fetching logs from auth, telephony, activity, and trust monitor endpoints and sending over TCP, TCP Encrypted over SSL, and UDP to consuming systems.
- Ability to recover data by reading from last known offset through checkpointing files.
- Enabling only certain endpoints through config file.
- Choosing how logs are formatted (JSON, CEF).
- Support for Linux, MacOS, Windows.
- Support for pulling logs from MSP subaccounts using a parent Admin API integration.
- Graceful shutdown support via SIGINT (Ctrl-C) and SIGTERM signals.
- Adding more log endpoints.
- Adding better skey security.
- Adding CEF and MSP support for the Trust Monitor endpoint.
- Run DuoLogSync with the UTC/GMT timezone so API and checkpoint timestamps
remain correct. If the host or service already runs in UTC, no
TZprefix is needed. Otherwise, usingTZ=UTCis recommended on macOS and Linux, as shown in the test procedures.
- See
template_config.ymlfor an example and for extensive, in-depth config explanation.
- The
log_formatfield is adls_settingssetting and it is for how Duo logs should be formatted before being sent to a server/siem. Valid options are CEF, JSON. The default will be JSON. - The
offsetfield is aapisetting and it is for days in the past from which record retrieval should begin. Maximum logs that can be fetched is180 daysin past. The default is 180. - The
timeoutfield is aapisetting and it is forsecondsto wait between API calls (for fetching Duo logs). If timeout is set to less than 120 seconds, it will be defaulted to 120. - The
request_timeoutfield is anapisetting that limits how many seconds an individual Duo Admin API request may wait for a response. Timed-out requests are retried on the next polling cycle. The default is 60 seconds. - The
enabledcheckpoint setting controls whether DLS recovers offsets from existing checkpoint files at startup. DLS writes checkpoint files after successful delivery regardless of this setting. Valid values areTrueandFalse. - The
directorycheckpoint setting specifies where checkpoint files are stored. DLS creates the directory at startup when it does not exist, but the parent location must be writable. The default is/tmp. - The
proxy_serveris aproxysetting and it is a Host/IP for the Http Proxy. - The
proxy_portis aproxysetting and it is a Port for the Http Proxy. - The
idis aserverssetting and it is a descriptive name for your server. It is aREQUIREDfield. - The
hostnameis aserverssetting and it is a address of TCP/UDP server to which Duo logs will be sent. It is aREQUIREDfield. - The
portis aserverssetting and it is a Port of server to which logs will be sent. The valid port range is 1024-65535. It is aREQUIREDfield. - The
protocolis aserverssetting and it is a transport protocol used to communicate with the server. The allowed options areTCP,TCPSSL,UDP. It is aREQUIREDfield. - The
cert_filepathis aserverssetting and it is a location of the certificate file used for encrypting communication for TCPSSL. TCPSSL expects that there are .key and .cert files that store keys. For configuration, give path of .cert/.pem file that has keys. It is aREQUIREDfield if protocol is TCPSSL. - The
ikeyis anaccountsetting containing the integration key of the Admin API application. For MSP collection, use the parent account's Admin API integration key. It is aREQUIREDfield. - The
skeyis anaccountsetting containing the secret key of the Admin API application. For MSP collection, use the parent account's Admin API secret key. It is aREQUIREDfield. - The
hostnameis anaccountsetting containing the API hostname of the Admin API application. For MSP collection, use the parent account's Admin API hostname; child API hostnames are discovered automatically. It is aREQUIREDfield. - The
endpointsfield is aendpoint_server_mappingssetting. It is for defining what endpoints the mapping is for as a list. The valid options areauth,telephony,trustmonitor,activity. It is aREQUIREDfield. - The
serverfield is aendpoint_server_mappingssetting. It is where you define to what servers the logs of certain endpoints should go.This is done by creating a mapping (start with dash -).It is aREQUIREDfield. - The
is_mspfield is to define whether this account is a Duo MSP account with child accounts. If True, then all the child accounts will be accessed and logs will be pulled for each child account. It is aNOT REQUIREDfield. The default isFalse
- From time to time new features and fields will be added to the config file. Updating of the config file is mandatory when config changes are made. To make this easier, Duo has created a script called
upgrade_config.pywhich will automatically update your old config for you. - To use the
upgrade_config.pyscript, simply run the following command:python3 upgrade_config.py <old_config> <new_config>where<old_config>is the filepath or your old configuration file, and<new_config>is where you would like the new configuration file to be saved. - The
upgrade_config.pyscript will not delete your old config file, it will be preserved. - This script is a new feature and has to extrapolate some information, some unexpected issues may occur. For most old configs the script will work just fine. You can check if the new config file works by running it with DLS.
- Set
is_msptoTruewhen the configured Admin API application belongs to a parent MSP account and logs should be collected from its subaccounts. The upgrade script does not enable this field automatically.
This procedure performs an end-to-end local test using one regular Duo account. It does not require an MSP account, the deprecated Accounts API integration, or any subaccounts. DLS retrieves events from the Duo Admin API and sends them over TCP to a local Netcat process, which saves them as newline-delimited JSON.
The commands below are written for macOS or Linux. Run them from the root of
the cloned duo_log_sync repository.
The test requires Git, Python 3.13, Netcat (nc), and jq. Check that they are
available:
git --version
python3.13 --version
nc -h
jq --versionInstall any missing command with the operating system's package manager before
continuing. Netcat receives the events sent by DLS, and jq validates and
examines the captured JSON.
- Sign in to the Duo Admin Panel as an administrator with the Owner role.
- Open Applications → Application Catalog.
- Locate Admin API and add the application.
- Enable Grant read log.
- Record the integration key, secret key, and API hostname securely. Enter
them in the local configuration under Verify
config.ymlbelow. - If Networks for API Access is configured, allow the public IP address of the computer that will run DLS.
- Save the application.
Do not create an Accounts API integration. A regular-account test does not need Grant accounts - Read or any permissions under Subaccount permissions.
cd /path/to/duo_log_sync
git status
git branch --show-current
git log -1 --onelineCheck out the release branch or tag being tested before continuing. The working
tree should be clean. Local config.yml is ignored by Git and should not
appear in git status.
Create a virtual environment and install the application and test dependencies:
python3.13 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -e .
python -m pip install -r requirements-dev-3.13.txtVerify the installation:
duologsync --helpFor a regular account, the relevant settings should look like this. Keep the
real Admin API credentials only in the local config.yml file.
version: '1.0.0'
dls_settings:
log_filepath: '/tmp/duologsync.log'
log_format: 'JSON'
api:
# Fetch approximately the previous 2.4 hours during the initial test.
offset: 0.1
# Wait two minutes between polling cycles.
timeout: 120
# Do not allow an individual Admin API request to wait indefinitely.
request_timeout: 60
checkpointing:
# Ignore previous checkpoint offsets during the first clean test.
enabled: False
directory: '/tmp'
servers:
- id: 'local-test'
hostname: '127.0.0.1'
port: 8888
protocol: 'TCP'
account:
ikey: 'REPLACE_WITH_ADMIN_API_INTEGRATION_KEY'
skey: 'REPLACE_WITH_ADMIN_API_SECRET_KEY'
hostname: 'api-xxxxxxxx.duosecurity.com'
endpoint_server_mappings:
- endpoints: ['auth', 'telephony', 'trustmonitor', 'activity']
server: 'local-test'
is_msp: FalseProtect the credentials and verify that Git ignores the file:
chmod 600 config.yml
git check-ignore config.yml
git status --shortgit check-ignore should print config.yml, and git status --short should
not list it. The value of is_msp must be False; otherwise DLS will attempt
to discover and process subaccounts.
Trust Monitor is only available to eligible older accounts. If the account is
not eligible, remove trustmonitor from the endpoint list and test auth,
telephony, and activity.
Open the first terminal and run:
cd /path/to/duo_log_sync
umask 077
nc -lk 8888 > /tmp/duo-events.ndjsonLeave this command running. It normally displays no output while it waits for DLS to connect.
The command has the following parts:
ncstarts Netcat.-llistens for an incoming connection.-kkeeps listening after a connection closes.8888is the TCP port configured inconfig.yml.>writes the received events to/tmp/duo-events.ndjson, replacing the previous capture when the receiver starts.
DLS must have a destination server available before it starts. If the receiver is not running, DLS cannot open its configured TCP connection.
Open a second terminal and run:
cd /path/to/duo_log_sync
source .venv/bin/activate
TZ=UTC duologsync "$PWD/config.yml"TZ=UTC runs the process in the timezone expected by DLS without changing the
computer's system timezone. Leave DLS running for at least two polling cycles.
Generate the event types that are practical for the test account:
- Authentication: sign in to a Duo-protected application. Duo Push is sufficient for an authentication event.
- Activity: sign in to the Duo Admin Panel or perform an approved test administration action.
- Telephony: perform an SMS or phone-call authentication. Duo Push does not create a telephony event, and SMS or phone calls may consume telephony credits.
- Trust Monitor: existing events may be returned for an eligible account; there is no simple deterministic event to generate.
Generate these events soon after starting DLS, then wait three to five minutes. Duo intentionally delays availability of new authentication, telephony, and activity events by about two minutes, and DLS polls every 120 seconds by default.
Open a third terminal. Monitor the application log:
tail -f /tmp/duologsync.logSuccessful retrieval and delivery looks similar to:
auth producer: adding 1 logs to the queue
auth consumer: successfully wrote all logs
A successful request with no matching events looks similar to:
telephony producer: no new logs to add to the queue
A transient failure should be logged and retried without stopping DLS:
activity producer: retrying due to error: Received 502 ...
activity producer: fetching next logs after 120 seconds
In the same terminal, or a fourth terminal, inspect new events as they arrive:
tail -f /tmp/duo-events.ndjsonThe application log contains DLS status messages. The NDJSON file contains the actual events fetched from Duo.
After at least one complete polling cycle has produced events:
- Press
Ctrl-Cin the DLS terminal. - Confirm that DLS reports a successful shutdown.
- Press
Ctrl-Cin the Netcat terminal. - Stop any
tail -fcommands withCtrl-C.
Count the captured records:
wc -l /tmp/duo-events.ndjsonValidate that every line contains valid JSON:
jq -e . /tmp/duo-events.ndjson >/dev/null && \
echo 'All records are valid JSON'Count records by their distinguishing schema fields:
jq -r '
if has("telephony_id") then "telephony"
elif has("eventtype") then "authentication"
elif has("triage_event_uri") then "trustmonitor"
elif has("action") then "activity"
else "unknown"
end
' /tmp/duo-events.ndjson | sort | uniq -cConfirm that the capture is non-empty and regular-account events do not have
the MSP-only child_account_id field:
jq -s -e 'length > 0 and all(.[]; has("child_account_id") | not)' \
/tmp/duo-events.ndjsonThe expected result is true and exit status 0.
After the initial test, change checkpointing to:
checkpointing:
enabled: True
directory: '/tmp'Restart Netcat and DLS. The application log should report that each producer is recovering its offset from a checkpoint file. Events processed before the saved offset should not be emitted again.
With the virtual environment still active, run:
python -m pytest -q
python -m pylint duologsync tests
python -m compileall -q duologsync testsAll tests and subtests must pass. Pylint and compileall should exit
successfully.
- DLS cannot connect to
127.0.0.1:8888: start the Netcat receiver before starting DLS and confirm that the hostname, port, and protocol matchconfig.yml. - Duo returns HTTP 401: verify the integration key, secret key, API hostname, and the system clock.
- Duo returns HTTP 403: verify Grant read log and any configured Networks for API Access restrictions.
- No events are captured: generate a new event, wait for Duo's two-minute availability delay, and allow DLS to complete another polling cycle.
- Telephony is empty: create an SMS or phone-call authentication; Duo Push does not generate a telephony record.
- Trust Monitor is unavailable: remove
trustmonitorif the account is not eligible for the legacy Trust Monitor API. - Duo returns HTTP 429 or 5xx: DLS should log a warning and retry on the next polling cycle. Confirm that the process remains running.
The application log and capture file can contain sensitive information, including account identifiers and Duo event data. Do not commit them or share them without appropriate redaction, and remove local captures when the test is complete.
This procedure performs an end-to-end local test using a parent Duo MSP account and its subaccounts. DLS authenticates with one Admin API application in the parent, discovers the child accounts, requests logs from each child's API hostname, and sends the events over TCP to a local Netcat receiver.
The current MSP implementation collects logs from discovered subaccounts only.
It does not collect the parent account's own logs. Each emitted child event has
a child_account_id field so records can be attributed to the correct account.
The commands below are written for macOS or Linux. Run them from the root of
the cloned duo_log_sync repository.
The test requires Git, Python 3.13, Netcat (nc), and jq:
git --version
python3.13 --version
nc -h
jq --versionInstall any missing command with the operating system's package manager before
continuing. Netcat receives the events sent by DLS, and jq validates and
summarizes the captured NDJSON records.
- Sign in to the parent MSP Duo Admin Panel as an administrator with the Owner role.
- Open Applications → Application Catalog.
- Locate Admin API and add or open the application used by DLS.
- Under Subaccount permissions, enable Grant accounts - Read. DLS
needs this permission to discover the subaccounts with
POST /accounts/v1/account/list. - Under Subaccount permissions, enable Grant read log. DLS needs this permission to retrieve authentication, telephony, and activity logs for the discovered children.
- If Networks for API Access is configured, allow the public IP address of the computer that will run DLS.
- Save the application and copy its integration key, secret key, and API hostname.
Do not create an Accounts API application. Do not create separate Admin API
applications in the child accounts. The parent Admin API credentials sign the
child requests, while each child's account_id and api_hostname come from
the discovery response.
Before starting DLS, confirm that the parent has at least one active subaccount. For a meaningful routing test, use two or more subaccounts and plan to generate an event in every child.
Record the child Admin Panel names or URLs for your own reference. Do not put
Admin Panel hostnames such as admin-xxxxxxxx.duosecurity.com in the DLS
configuration. The configuration requires the parent application's API
hostname, which starts with api-.
cd /path/to/duo_log_sync
git status
git branch --show-current
git log -1 --onelineCheck out the release branch or tag being tested before continuing. The tracked
config_msp.yml file is a credential-free template. Real credentials belong
only in the ignored local copy created in the next step.
Create a virtual environment and install the application and test dependencies:
python3.13 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -e .
python -m pip install -r requirements-dev-3.13.txtVerify the installation:
duologsync --helpCopy the tracked template and protect the local file:
cp config_msp.yml config_msp.local.yml
chmod 600 config_msp.local.ymlEdit only these three values in config_msp.local.yml:
account:
ikey: 'REPLACE_WITH_PARENT_ADMIN_API_INTEGRATION_KEY'
skey: 'REPLACE_WITH_PARENT_ADMIN_API_SECRET_KEY'
hostname: 'api-xxxxxxxx.duosecurity.com'Keep the template's remaining MSP-specific settings:
dls_settings:
log_filepath: '/tmp/duologsync-msp.log'
log_format: 'JSON'
api:
offset: 0.1
timeout: 120
request_timeout: 60
checkpointing:
enabled: False
directory: '/tmp/duologsync-msp-checkpoints'
servers:
- id: 'local-msp-test'
hostname: '127.0.0.1'
port: 8888
protocol: 'TCP'
account:
endpoint_server_mappings:
- endpoints: ['auth', 'telephony', 'activity']
server: 'local-msp-test'
is_msp: TrueThis tracked file is a short-window smoke-test template, not a production configuration. Review the offset and checkpoint-recovery settings before using it for a long-running deployment.
offset: 0.1 starts the initial request approximately 2.4 hours in the past.
timeout: 120 polls every two minutes, and request_timeout: 60 bounds each
Admin API request. DLS creates the checkpoint directory on startup; its parent
directory must be writable by the DLS process.
Verify that the template is tracked and the credential-bearing copy is ignored:
git ls-files --error-unmatch config_msp.yml
git check-ignore config_msp.local.yml
git status --shortgit check-ignore should print config_msp.local.yml, and git status should
not list it. Never put real credentials in the tracked config_msp.yml file.
Trust Monitor is deliberately absent. DLS does not support the Trust Monitor endpoint in MSP mode.
Open the first terminal and run:
cd /path/to/duo_log_sync
umask 077
nc -lk 8888 > /tmp/duo-msp-events.ndjsonLeave the command running. It normally displays no output while it waits for DLS to connect.
nc -llistens for a TCP connection.-kkeeps the listener available after a connection closes.8888must match the port inconfig_msp.local.yml.>starts a fresh capture at/tmp/duo-msp-events.ndjson.umask 077ensures the sensitive capture is readable only by its owner.
DLS must have a destination available before it starts. If the receiver is not running, DLS cannot open its configured TCP connection.
Open a second terminal and run:
cd /path/to/duo_log_sync
source .venv/bin/activate
TZ=UTC duologsync "$PWD/config_msp.local.yml"Leave DLS running for at least two polling cycles. On startup, the application log should show one Admin client for the parent and one for every discovered subaccount. It must not expose the secret key.
Monitor the application log from another terminal:
tail -f /tmp/duologsync-msp.logIf DLS reports that no MSP subaccounts were returned, verify the parent integration's Grant accounts - Read subaccount permission and confirm that the parent actually contains active child accounts.
Perform these actions separately in each child account:
- Authentication: perform an end-user authentication against a Duo-protected application belonging to that child. An Admin Panel login is an activity event, not an authentication event.
- Activity: sign in to the child's Duo Admin Panel or perform an approved test administration action.
- Telephony: perform an SMS or phone-call authentication for that child. Duo Push does not create a telephony record, and SMS or phone calls may consume telephony credits.
Generate the events after DLS starts, then wait for at least three to five
minutes. Duo intentionally delays log availability by approximately two
minutes, and the template polls every 120 seconds. A successful API request
with no new records is not a failure; the log will say no new logs to add to the queue.
Watch records arrive without printing the DLS credential configuration:
tail -f /tmp/duo-msp-events.ndjsonSummarize the capture by child account and record type:
jq -r '
[
(.child_account_id // "missing-child-account-id"),
(if has("telephony_id") then "telephony"
elif has("activity_id") then "activity"
elif .eventtype == "authentication" then "authentication"
else "unknown"
end)
] | @tsv
' /tmp/duo-msp-events.ndjson | sort | uniq -cContinue the test until every expected child has a non-zero count for authentication, telephony, and activity. The account IDs in this output must correspond to distinct children returned by the parent discovery call.
After the expected matrix is complete:
- Press
Ctrl-Cin the DLS terminal. - Confirm that DLS reports a successful shutdown.
- Press
Ctrl-Cin the Netcat terminal. - Stop any
tail -fcommands withCtrl-C.
Count the records and validate that every line contains valid JSON:
wc -l /tmp/duo-msp-events.ndjson
jq -e . /tmp/duo-msp-events.ndjson >/dev/null && \
echo 'All records are valid JSON'List the distinct child account IDs:
jq -r '.child_account_id // "missing-child-account-id"' \
/tmp/duo-msp-events.ndjson | sort -uVerify that every emitted event has a non-empty child account ID:
jq -s -e '
length > 0 and all(.[]; has("child_account_id") and
(.child_account_id | type == "string" and length > 0))
' /tmp/duo-msp-events.ndjsonThe expected result is true. Parent-account events are not expected because
the current MSP implementation creates producers only for discovered children.
Check for byte-identical duplicate records:
sort /tmp/duo-msp-events.ndjson | uniq -d | wc -lThe expected result is 0.
After the clean initial test, change the local configuration to:
checkpointing:
enabled: True
directory: '/tmp/duologsync-msp-checkpoints'Restart Netcat and DLS. Checkpoint filenames should contain a child account ID, which prevents one child's offset from advancing another child's stream:
find /tmp/duologsync-msp-checkpoints -type f -printThe log should report recovery from separate child-specific checkpoint files. Previously processed events should not be emitted again.
With the virtual environment still active, run:
python -m pytest -q
python -m pylint duologsync tests
python -m compileall -q duologsync testsRun the focused offline MSP contract suite separately when diagnosing discovery or request-routing failures:
python -m pytest -q \
tests/test_msp_admin_api_contract.py tests/test_app.py tests/test_util.py- No children are discovered: verify Grant accounts - Read under the parent integration's subaccount permissions.
- HTTP 403 when fetching child logs: verify Grant read log under the parent integration's subaccount permissions and review network restrictions.
- HTTP 401: verify the parent integration key, secret key, API hostname, and the system clock.
- Only one child produces records: generate events in the other child and allow for Duo's availability delay plus another DLS polling cycle.
- Authentication remains empty: perform an end-user authentication to a Duo-protected application in the child; an Admin Panel login is not an authentication-log event.
- Telephony remains empty: use an SMS or phone-call authentication in the child; Duo Push does not generate a telephony record.
- Events lack
child_account_id: confirmis_msp: Trueand that DLS was started withconfig_msp.local.yml, not the regular-account configuration. - Trust Monitor is needed: it is not supported in MSP mode. Test that endpoint separately with a non-MSP configuration on an eligible account.
- Duo returns HTTP 429 or 5xx: DLS should log a warning and retry on the next polling cycle. Confirm that the process remains running.
- Cross-child duplicates or skipped records: inspect the child-specific checkpoint files and repeat once with checkpointing disabled.
- Duo deprecated the Accounts API integration type on June 11, 2026 and converted existing Accounts API integrations to Admin API integrations. DuoLogSync now uses only a parent Admin API integration for MSP collection.
- DuoLogSync uses each subaccount's own API hostname as returned by the Admin API, which supports subaccounts hosted in different Duo deployments.
The offline MSP tests encode Duo's documented Admin API subaccount contract:
- Discover subaccounts with
POST /accounts/v1/account/listusing the parent Admin API integration. - Send child requests to the returned
api_hostname. - Include the returned
account_idin every child Admin API request. - Keep event attribution and checkpoint state isolated by
account_id. - Query authentication, activity, and telephony logs no more recently than Duo's two-minute availability delay.
Run only these tests with:
pytest tests/test_msp_admin_api_contract.py tests/test_app.py tests/test_util.pyThese tests use fake credentials and intercept the Duo client's transport before any network connection is attempted. They verify the final child request URI and authentication header in addition to producer-level request parameters.
- Currently, the Trust Monitor endpoint only supports logging in JSON format, and does not support MSPs. Calling this endpoint (in combination with any other endpoints) using CEF format or MSPs will not allow the program to execute.
- API timeout errors: Ensure the
timeoutsetting is at least 120 seconds. DuoLogSync enforces this minimum to comply with Duo API rate limits. - Checkpoint file errors: Verify the configured checkpoint directory's parent exists and is writable. DLS creates the final checkpoint directory.
- SSL certificate errors: For TCPSSL protocol, ensure the certificate file path is correct and the file contains valid certificates.
- Timezone issues: Run the DuoLogSync process in the UTC/GMT timezone.
- Logs not appearing: Verify your receiving server is running and accessible at the configured hostname and port.
For issues and questions:
- Open an issue on GitHub
- Contact Duo Support at support@duosecurity.com
- Visit the Duo documentation for additional resources