Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,204 @@
---
title: "Auth JWT actions"
tags:
- workflow automation
- workflow
- workflow automation actions
- Auth actions
- Auth JWT actions
metaDescription: "A list of available auth jwt actions in the actions catalog for workflow definitions"
freshnessValidatedDate: never
---

<Callout title="preview">
We're still working on this feature, but we'd love for you to try it out!

This feature is currently provided as part of a preview program pursuant to our [pre-release policies](/docs/licenses/license-information/referenced-policies/new-relic-pre-release-policy).
</Callout>

This page provides a comprehensive reference for authentication actions available in the workflow automation actions catalog. These actions enable you to create and manage JSON Web Tokens (JWT) for secure authentication in your workflows.

## Authentication actions

<CollapserGroup>
<Collapser
id="auth.jwt.create"
title="Create a JSON Web Token"
>
Create a JSON Web Token

<Tabs>
<TabsBar>
<TabsBarItem id="authjwtcreateinputs">
Inputs
</TabsBarItem>

<TabsBarItem id="authjwtcreateoutputs">
Outputs
</TabsBarItem>

<TabsBarItem id="authjwtcreateexample">
Example
</TabsBarItem>
</TabsBar>

<TabsPages>
<TabsPageItem id="authjwtcreateinputs">
<table>
<thead>
<tr>
<th>Input Field</th>
<th>Type</th>
<th>Description</th>
<th>Example</th>
</tr>
</thead>
<tbody>
<tr>
<td>**algorithm**</td>
<td>String</td>
<td>Algorithm used to sign the token.</td>
<td>
RS256
<p>Supported algorithms: RS256 ,ES256</p>
</td>
</tr>
<tr>
<td>**privateKey**</td>
<td>String</td>
<td>
The private key for signing a JWT.
- RS256 supports private key in PKCS#8 & PKCS#1 format. ES256 supports private key in PKCS#8 (.p8) format.
- Private Key must be provided as a secret expression.
- PrivateKey must be stored as single line string in Secrets.
</td>
<td>`${{ :secrets:namespace:privateKey }}`</td>
</tr>
<tr>
<td>**headers**</td>
<td>Map</td>
<td>
Headers provides metadata for JWT
<p>
**UnSupported headers**: nested objects, arrays, null are not supported
</p>
</td>
<td>`{"kid": "key-2025-09"}`</td>
</tr>
<tr>
<td>**claims**</td>
<td>Map</td>
<td>
Claims are statements about an entity (typically, the user) and additional data
<p>
**Unsupported Claim Types**: null, Nested objects / arbitrary maps, Lists containing non-strings or mixed types.
</p>
</td>
<td>`{"role": "admin", "scope": "read:all"}`</td>
</tr>
<tr>
<td>**expirationTimeMinutes**</td>
<td>Int</td>
<td>
Expiration time in minutes
<p>
Expiration time should be greater than 0 and less than 30days.
</p>
</td>
<td>10</td>
</tr>
<tr>
<td>**includeIssuedAt**</td>
<td>Boolean</td>
<td>
Issued At timestamp
<p>
Default: true
</p>
</td>
<td>true</td>
</tr>
<tr>
<td>**selectors**</td>
<td>List</td>
<td></td>
<td>
```yaml
[name: token,

expression: .jwt

]
```
</td>
</tr>
</tbody>
</table>
</TabsPageItem>

<TabsPageItem id="authjwtcreateoutputs">
<table>
<thead>
<tr>
<th>Output Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>**success**</td>
<td>Boolean</td>
<td>`true/false`</td>
</tr>
<tr>
<td>**jwt**</td>
<td>String</td>
<td>"`xxxxx.yyyyy.zzzzz`“</td>
</tr>
<tr>
<td>**errorMessage**</td>
<td>String</td>
<td>`“Unsupported algorithm for creating jwt token"`</td>
</tr>
</tbody>
</table>
</TabsPageItem>

<TabsPageItem id="httpdeleteexample">
<table>
<thead>
<tr>
<th>Workflow definition</th>
</tr>
</thead>
<tbody>
<tr>
<td>
```yaml
name: create-json-web-token
description: ""
steps:
- name: auth_jwt_create_1
type: action
action: auth.jwt.create
version: "1"
inputs:
algorithm: RS256
privateKey: ${{ :secrets:namespace:privatekey}}
headers:
header1: value1
claims:
claim1: value1
expirationTimeMinutes: 10
next: end
```
</td>
</tr>
</tbody>
</table>
</TabsPageItem>
</TabsPages>
</Tabs>
</Collapser>
</CollapserGroup>
Loading
Loading