Skip to content

Cumulocity CLI 2.54.0

Choose a tag to compare

@github-actions github-actions released this 18 Mar 18:29
· 60 commits to v2 since this release
5283ec9

What's Changed

New features

Support for SSO Browser Authorization Flow - #624 and #637

Please read the pre-requisites for using the SSO Browser (Authorization Code) flow.

Extends session authentication to support additional SSO and OAuth2 login types. Users can now authenticate using:

  • Browser (Authorization Code Flow) — opens a local web browser to complete the OAuth2 login; a temporary local web server handles the callback
  • Device Flow — authenticate from a secondary device or browser without requiring a local callback URL
  • Device Certificate — login using a device x509 certificate

When creating or updating a session, users are prompted to select their preferred login method. The browser flow displays the authorization URL on the console and waits for the callback before returning.

Examples

# create a session using browser-based SSO
c8y sessions create --loginType BROWSER

# create a session using device flow
c8y sessions create --loginType DEVICE

Or you can also force the login type for an existing session using:

set-session --loginType BROWSER

New command: c8y tenants assert exists in #636

New command for asserting whether a tenant exists or not. Useful in automation workflows where you need to wait for a tenant to be provisioned or confirm it has been removed. Generally it can only check subtenants of the current tenant.

Example

# Check if a specific tenant exists
echo t9707 | c8y tenants assert exists

# Wait for a tenant to be deleted
c8y tenants list | c8y tenants assert exists --not

New command: c8y scripts format in #621

A utility command to reformat shell scripts that use c8y commands for use in CI/CD pipelines or cron jobs. It automatically inserts the -n flag to ensure pipeline detection works correctly in non-interactive environments like CI's where the standard input is being mapped to a FIFO buffer.

Example

# Print the formatted output to stdout
c8y scripts format script.sh

# Modify the file in place
c8y scripts format --in-place script.sh

# Modify in place with an explanatory comment header and 4-space indentation
c8y scripts format --add-comment --indent 4 script.sh

Support dates combining a fixed date with relative offset in #623

Extends relative date/time parsing to allow combining a fixed timestamp with a relative offset. Both ISO 8601 date strings and Unix epoch timestamps are supported as the base value.

Examples

# 10 days before a specific date
c8y events list --dateFrom "'2025-02-19T00:00:00' - 10d"

# 6 hours before a Unix epoch timestamp
c8y events list --dateFrom "1773417365 - 6h"

# Set a symmetric time window around a fixed point in time
TIME="1773417365"
c8y measurements list --dateFrom "'$TIME' - 6h" --dateTo "'$TIME' + 6h"

Fixes

  • fix(assert): rename retries to attempts in the inventory/devices assert exists command in #635

    The introduction of a global --retries flag caused a name clash with the per-command retry option on c8y inventory assert exists and c8y devices assert exists, silently disabling their retry mechanism. The flag has been renamed to --attempts to resolve the conflict.

  • fix(login): login should respect the sensitive info logging to not leak secrets by default in #638

    Log entries within c8y sessions login were not respecting the C8Y_SETTINGS_LOGGER_HIDESENSITIVE setting when interacting with an external session provider, which could result in credentials appearing in log output.

Full Changelog: v2.53.4...v2.54.0