@@ -37,6 +37,7 @@ Quick Start
3737- ``secure-ldap `` - LDAP authentication over TLS
3838- ``secure-mtls `` - Mutual TLS certificate authentication
3939- ``secure-oidc `` - OpenID Connect (OAuth2) authentication
40+ - ``bearer-token `` - Pre-obtained JWT bearer token
4041- ``env `` - Pure environment variable configuration (no profiles file required)
4142
4243Why Use Profiles?
@@ -88,6 +89,7 @@ Default profiles are defined in ``examples/profiles.yml`` (JSON is also supporte
8889 # Authentication credentials
8990 nifi_user : " einstein"
9091 nifi_pass : " password1234"
92+ nifi_bearer_token : null
9193 registry_user : " einstein"
9294 registry_pass : " password1234"
9395
@@ -133,6 +135,7 @@ Core connection settings:
133135
134136Authentication credentials:
135137 - ``nifi_user `` / ``nifi_pass `` - NiFi Basic authentication credentials
138+ - ``nifi_bearer_token `` - Pre-obtained JWT bearer token for NiFi
136139 - ``registry_user `` / ``registry_pass `` - Registry Basic authentication credentials
137140
138141Shared SSL/TLS certificates (simple PKI - convenience options where both NiFi and Registry share configuration):
@@ -155,7 +158,7 @@ Advanced settings:
155158 - ``nifi_proxy_identity `` - Identity for NiFi → Registry proxied requests
156159
157160Authentication method control:
158- - ``nifi_auth_method `` - Explicit authentication method for NiFi (overrides auto-detection). Valid values: ``oidc ``, ``mtls ``, ``basic ``
161+ - ``nifi_auth_method `` - Explicit authentication method for NiFi (overrides auto-detection). Valid values: ``bearer ``, `` oidc ``, ``mtls ``, ``basic ``
159162 - ``registry_auth_method `` - Explicit authentication method for Registry (overrides auto-detection). Valid values: ``mtls ``, ``basic ``, ``unauthenticated ``
160163
161164OIDC authentication:
@@ -170,7 +173,7 @@ Profile Switching Behavior
1701731. **Explicit method specification ** (highest priority): If ``nifi_auth_method `` or ``registry_auth_method `` are set, that method is used regardless of other available credentials.
1711742. **Auto-detection ** (fallback): When no explicit method is specified, the system auto-detects based on available credentials. Detection order varies by service:
172175
173- - **NiFi **: **1) OIDC ** (``oidc_token_endpoint ``), **2 ) mTLS ** (``client_cert `` + ``client_key ``), **3 ) Basic Auth ** (``nifi_user `` + ``nifi_pass ``)
176+ - **NiFi **: **1) Bearer Token ** (`` nifi_bearer_token ``), ** 2) OIDC ** (``oidc_token_endpoint ``), **3 ) mTLS ** (``client_cert `` + ``client_key ``), **4 ) Basic Auth ** (``nifi_user `` + ``nifi_pass ``)
174177 - **Registry **: **1) mTLS ** (``client_cert `` + ``client_key ``), **2) Basic Auth ** (``registry_user `` + ``registry_pass ``), **3) Unauthenticated ** (no credentials required)
175178
176179For predictable behavior, either use explicit method specification or design profiles with only one authentication method per environment.
@@ -318,6 +321,37 @@ OpenID Connect (OAuth2) authentication:
318321
319322**Use case **: Modern OAuth2 integration, external identity providers
320323
324+ bearer-token (Simplest Configuration)
325+ --------------------------------------
326+
327+ Pre-obtained JWT bearer token authentication - the simplest possible configuration:
328+
329+ .. code-block :: python
330+
331+ nipyapi.profiles.switch(' bearer-token' )
332+
333+ **Authentication method **: Bearer Token (detected by presence of ``nifi_bearer_token ``)
334+
335+ **Required properties **:
336+ - ``nifi_bearer_token: "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9..." `` (your JWT token)
337+
338+ **Additional properties used **:
339+ - ``nifi_url: https://nifi.example.com/nifi-api ``
340+ - ``nifi_verify_ssl: true `` (or false for self-signed certificates)
341+
342+ **Use case **: CI/CD pipelines, GitHub Actions, Kubernetes jobs, or any scenario where you have a pre-obtained JWT token from your identity provider. This is the simplest authentication method - just a URL and a token.
343+
344+ **Example using environment variables only **:
345+
346+ .. code-block :: shell
347+
348+ # Set environment variables
349+ export NIFI_API_ENDPOINT=https://nifi.production.example.com/nifi-api
350+ export NIFI_BEARER_TOKEN=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...
351+
352+ # Use the 'env' profile to load from environment
353+ python -c " import nipyapi; nipyapi.profiles.switch('env')"
354+
321355 cli-properties
322356--------------
323357
@@ -410,6 +444,7 @@ URLs and credentials:
410444 - ``REGISTRY_API_ENDPOINT `` → ``registry_url ``
411445 - ``NIFI_USERNAME `` → ``nifi_user ``
412446 - ``NIFI_PASSWORD `` → ``nifi_pass ``
447+ - ``NIFI_BEARER_TOKEN `` → ``nifi_bearer_token ``
413448 - ``REGISTRY_USERNAME `` → ``registry_user ``
414449 - ``REGISTRY_PASSWORD `` → ``registry_pass ``
415450
0 commit comments