Skip to content

Commit e5ade84

Browse files
razvanclaude
andcommitted
refactor(openlineage): use credentialsSecretName instead of AuthenticationClass
Follows the operator-rs change: OpenLineage backend auth is a static bearer token, so drop the AuthenticationClass resolution and read the api key from the connection's `credentialsSecretName` Secret (key `apiKey`) directly. See stackabletech/decisions#90 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 5b8b5ba commit e5ade84

7 files changed

Lines changed: 47 additions & 150 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
### Added
66

7-
- Support for emitting [OpenLineage](https://openlineage.io/) lineage events via `spec.clusterConfig.openLineage`, either with an inline connection or a reference to an `OpenLineageConnection`, with optional TLS and Static-provider API-key authentication. Requires the `apache-airflow-providers-openlineage` provider to be installed in the product image ([#XXXX]).
7+
- Support for emitting [OpenLineage](https://openlineage.io/) lineage events via `spec.clusterConfig.openLineage`, either with an inline connection or a reference to an `OpenLineageConnection`, with optional TLS and API-key authentication via a `credentialsSecretName` Secret. Requires the `apache-airflow-providers-openlineage` provider to be installed in the product image ([#XXXX]).
88
- BREAKING: Add required CLI argument and env var to set the image repository used to construct final product image names: `IMAGE_REPOSITORY` (`--image-repository`), eg. `oci.example.org/my/namespace` ([#784]).
99
- Support for passing CAs to GitSync ([#750]).
1010
- Support setting `clientAuthenticationMethod` for OIDC authentication. The value is passed through to the Flask-AppBuilder config as `token_endpoint_auth_method` ([#765]).

Cargo.lock

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.nix

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/modules/airflow/pages/usage-guide/openlineage.adoc

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,9 @@ Use `verification.server.caCert.webPki` to verify against the common public CAs
9696

9797
== Authentication
9898

99-
If the backend requires a bearer token, reference a xref:concepts:authentication.adoc[Static AuthenticationClass].
100-
Only the `static` provider is supported.
101-
102-
The referenced Secret must contain the token under the fixed key `apiKey`:
99+
If the backend requires a bearer token, set `credentialsSecretName` on the connection to the name of
100+
a Secret containing the token. The Secret must contain the token under the fixed key `apiKey` and must
101+
live in the same namespace as the cluster:
103102

104103
[source,yaml]
105104
----
@@ -109,16 +108,6 @@ metadata:
109108
name: openlineage-credentials
110109
stringData:
111110
apiKey: "<your-token>" # <1>
112-
---
113-
apiVersion: authentication.stackable.tech/v1alpha1
114-
kind: AuthenticationClass
115-
metadata:
116-
name: openlineage-auth
117-
spec:
118-
provider:
119-
static:
120-
userCredentialsSecret:
121-
name: openlineage-credentials
122111
----
123112
<1> The bearer token, under the fixed key `apiKey`.
124113

@@ -129,9 +118,9 @@ openLineage:
129118
inline:
130119
host: marquez
131120
port: 5000
132-
authenticationClassRef: openlineage-auth # <1>
121+
credentialsSecretName: openlineage-credentials # <1>
133122
----
134-
<1> Name of the cluster-scoped `AuthenticationClass`.
123+
<1> Name of the Secret holding the API key.
135124

136125
The token is injected into the Airflow pods from the Secret via a `secretKeyRef` environment variable.
137126
It never appears in the CRD, a ConfigMap, or a plaintext environment value.

extra/crds.yaml

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1535,12 +1535,11 @@ spec:
15351535
OpenLineage connection definition as a resource.
15361536
Learn more about [OpenLineage](https://openlineage.io/).
15371537
properties:
1538-
authenticationClassRef:
1538+
credentialsSecretName:
15391539
description: |-
1540-
Name of an [`AuthenticationClass`](https://docs.stackable.tech/home/nightly/concepts/authentication) used
1541-
to authenticate against the OpenLineage backend. The `AuthenticationClass` is cluster-scoped
1542-
and referenced by name; it is resolved at runtime via
1543-
[`OpenLineageConnectionSpec::resolve_authentication_class`]. If not specified, no
1540+
Name of a Secret containing the API key used to authenticate against the OpenLineage
1541+
backend. The API key must be stored under the key `apiKey`. The Secret must be located in
1542+
the same namespace as the workload using this connection. If not specified, no
15441543
authentication is used.
15451544
nullable: true
15461545
type: string
@@ -7849,12 +7848,11 @@ spec:
78497848
OpenLineage connection definition as a resource.
78507849
Learn more about [OpenLineage](https://openlineage.io/).
78517850
properties:
7852-
authenticationClassRef:
7851+
credentialsSecretName:
78537852
description: |-
7854-
Name of an [`AuthenticationClass`](https://docs.stackable.tech/home/nightly/concepts/authentication) used
7855-
to authenticate against the OpenLineage backend. The `AuthenticationClass` is cluster-scoped
7856-
and referenced by name; it is resolved at runtime via
7857-
[`OpenLineageConnectionSpec::resolve_authentication_class`]. If not specified, no
7853+
Name of a Secret containing the API key used to authenticate against the OpenLineage
7854+
backend. The API key must be stored under the key `apiKey`. The Secret must be located in
7855+
the same namespace as the workload using this connection. If not specified, no
78587856
authentication is used.
78597857
nullable: true
78607858
type: string
@@ -12692,12 +12690,11 @@ spec:
1269212690
OpenLineage connection definition as a resource.
1269312691
Learn more about [OpenLineage](https://openlineage.io/).
1269412692
properties:
12695-
authenticationClassRef:
12693+
credentialsSecretName:
1269612694
description: |-
12697-
Name of an [`AuthenticationClass`](https://docs.stackable.tech/home/nightly/concepts/authentication) used
12698-
to authenticate against the OpenLineage backend. The `AuthenticationClass` is cluster-scoped
12699-
and referenced by name; it is resolved at runtime via
12700-
[`OpenLineageConnectionSpec::resolve_authentication_class`]. If not specified, no
12695+
Name of a Secret containing the API key used to authenticate against the OpenLineage
12696+
backend. The API key must be stored under the key `apiKey`. The Secret must be located in
12697+
the same namespace as the workload using this connection. If not specified, no
1270112698
authentication is used.
1270212699
nullable: true
1270312700
type: string

0 commit comments

Comments
 (0)