Error: Snowflake authentication failure due to 80 character token limit - AutoSys
search cancel

Error: Snowflake authentication failure due to 80 character token limit - AutoSys

book

Article ID: 446134

calendar_today

Updated On:

Products

Autosys Workload Automation Workload Automation Agent

Issue/Introduction

When configuring AutoSys SQL job types to authenticate with Snowflake using tokens, the connection fails. This typically occurs when the Snowflake token exceeds 80 characters.

The standard format sqlagent_user_name: user@token truncates any characters beyond the product limit, leading to authentication errors.

Environment

Product: AutoSys Workload Automation/Workload Automation Agent
Plugin: Application Services
Version: ALL

Cause

There is a known character limitation within the AutoSys SQL job type definition. The sqlagent_user_name field restricts the token portion (the string following the @ symbol) to a maximum of 80 characters. Modern Snowflake tokens often exceed 230 characters, making them incompatible with this specific job configuration.

Resolution

To bypass the character limit of the standard SQL job type, use the Database Agent with a customized JDBC connection string utilizing JSON Web Token (JWT) authentication. This method references a local private key file rather than passing the raw token string through the job definition.

Implementation Steps

  1. Generate a Private Key: Ensure you have a Snowflake-compatible private key file (typically in .p8 format) and its associated passphrase.
  2. Secure the Key File: Place the .p8 file on the System Agent machine. Set file permissions so that only the user ID running the Agent service has read access.
  3. Configure the JDBC Connection: Modify the job's JDBC connection string to include the SNOWFLAKE_JWT authenticator.
  4. Update the Connection String Parameters: Use the following format for the JDBC URL:
    jdbc:snowflake://<account_url>/?authenticator=SNOWFLAKE_JWT&private_key_file=<path_to_key_file>&private_key_file_pwd=<passphrase>
    • authenticator: Must be set to SNOWFLAKE_JWT.
    • private_key_file: The full local path to your .p8 private key file.
    • private_key_file_pwd: The passphrase used to encrypt the private key.

Example:
jdbc:snowflake://xyz12345.snowflakecomputing.com/?authenticator=SNOWFLAKE_JWT&private_key_file=/opt/broadcom/agent/keys/snowflake_key.p8&private_key_file_pwd=####

This configuration allows the AutoSys agent to authenticate securely without being restricted by the 80-character limit of the sqlagent_user_name attribute.

Additional Information

The character limit for tokens in the SQL job type is a product limitation. Targeted to be fixed in a future release (Tentative). To advocate for increasing the character limit, open a new case to submit a Request for Enhancement (RFE).

To speak with a customer representative or a Support Engineer see Contact Support. Scroll to the bottom of the page and click on your respective region.

Subscribe to this article to receive updates on fix status: Article 275360.