Skip to content

Commit 83863c9

Browse files
Karakatiza666gz
authored andcommitted
[WebConsole] Fix refresh_token not provided without offline_access OIDC scope
Make env variables for auth configuration consistend with the rest Signed-off-by: Karakatiza666 <bulakh.96@gmail.com>
1 parent 830d82f commit 83863c9

File tree

13 files changed

+39
-33
lines changed

13 files changed

+39
-33
lines changed

.github/workflows/test-integration-platform.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ jobs:
9494
--mount type=bind,src=./test-tls,dst=/home/ubuntu/test-tls,readonly \
9595
-p 8080:8080 \
9696
-e AUTH_PROVIDER="${{ vars.OIDC_TEST_ISSUER && 'generic-oidc' || 'none' }}" \
97-
-e AUTH_CLIENT_ID="${{ vars.OIDC_TEST_CLIENT_ID }}" \
98-
-e AUTH_ISSUER="${{ vars.OIDC_TEST_ISSUER }}" \
97+
-e FELDERA_AUTH_CLIENT_ID="${{ vars.OIDC_TEST_CLIENT_ID }}" \
98+
-e FELDERA_AUTH_ISSUER="${{ vars.OIDC_TEST_ISSUER }}" \
9999
-e RUST_LOG=info \
100100
-e RUST_BACKTRACE=1 \
101101
${{ vars.FELDERA_IMAGE_NAME }}:sha-${{ github.sha }} \
@@ -170,8 +170,8 @@ jobs:
170170
env:
171171
# Configure OIDC authentication if available, otherwise use no auth
172172
AUTH_PROVIDER: ${{ vars.OIDC_TEST_ISSUER && 'generic-oidc' || 'none' }}
173-
AUTH_CLIENT_ID: ${{ vars.OIDC_TEST_CLIENT_ID }}
174-
AUTH_ISSUER: ${{ vars.OIDC_TEST_ISSUER }}
173+
FELDERA_AUTH_CLIENT_ID: ${{ vars.OIDC_TEST_CLIENT_ID }}
174+
FELDERA_AUTH_ISSUER: ${{ vars.OIDC_TEST_ISSUER }}
175175
RUST_LOG: info
176176
RUST_BACKTRACE: 1
177177
# Needed by test_update_runtime.py

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,3 +82,6 @@ playwright/.cache/
8282
*.pem
8383
*.crt
8484
*.key
85+
86+
# pnpm
87+
.pnpm-store

CLAUDE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6697,8 +6697,8 @@ Additional features:
66976697
#### **Configuration**
66986698
```bash
66996699
# Environment variables for OIDC providers
6700-
AUTH_ISSUER=https://your-domain.okta.com/oauth2/<custom-auth-server-id>
6701-
AUTH_CLIENT_ID=your-client-id
6700+
FELDERA_AUTH_ISSUER=https://your-domain.okta.com/oauth2/<custom-auth-server-id>
6701+
FELDERA_AUTH_CLIENT_ID=your-client-id
67026702
67036703
# For AWS Cognito (additional variables)
67046704
AWS_COGNITO_LOGIN_URL=https://your-domain.auth.region.amazoncognito.com/login

crates/pipeline-manager/src/auth.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
//! a restart of the pipeline manager will refresh the cache.
2323
//!
2424
//! To support bearer token workflows, we require environment variables specific
25-
//! to each provider. All providers require AUTH_CLIENT_ID and AUTH_ISSUER.
25+
//! to each provider. All providers require FELDERA_AUTH_CLIENT_ID and FELDERA_AUTH_ISSUER.
2626
//! Some providers may require additional configuration (see provider-specific
2727
//! functions below).
2828
//!
@@ -399,9 +399,10 @@ pub(crate) enum AuthProvider {
399399

400400
pub(crate) fn aws_auth_config() -> AuthConfiguration {
401401
let mut validation = Validation::new(Algorithm::RS256);
402-
let client_id =
403-
env::var("AUTH_CLIENT_ID").expect("Missing environment variable AUTH_CLIENT_ID");
404-
let iss = env::var("AUTH_ISSUER").expect("Missing environment variable AUTH_ISSUER");
402+
let client_id = env::var("FELDERA_AUTH_CLIENT_ID")
403+
.expect("Missing environment variable FELDERA_AUTH_CLIENT_ID");
404+
let iss =
405+
env::var("FELDERA_AUTH_ISSUER").expect("Missing environment variable FELDERA_AUTH_ISSUER");
405406
let jwk_uri = format!("{}/.well-known/jwks.json", iss);
406407
// We do not validate with set_audience because it is optional,
407408
// and AWS Cognito doesn't consistently claim it in JWT (e.g. via Hosted UI
@@ -426,8 +427,8 @@ pub(crate) async fn generic_oidc_auth_config(
426427
) -> Result<AuthConfiguration, Box<dyn std::error::Error>> {
427428
let mut validation = Validation::new(Algorithm::RS256);
428429
let client_id =
429-
env::var("AUTH_CLIENT_ID").expect("Missing environment variable AUTH_CLIENT_ID");
430-
let iss = env::var("AUTH_ISSUER").expect("Missing environment variable AUTH_ISSUER");
430+
env::var("FELDERA_AUTH_CLIENT_ID").expect("Missing environment variable FELDERA_AUTH_CLIENT_ID");
431+
let iss = env::var("FELDERA_AUTH_ISSUER").expect("Missing environment variable FELDERA_AUTH_ISSUER");
431432

432433
// Use OIDC discovery to fetch jwks_uri
433434
let jwk_uri = fetch_jwks_uri_from_discovery(&iss).await?;

crates/pipeline-manager/src/config.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -585,8 +585,8 @@ pub struct ApiServerConfig {
585585
///
586586
/// Usage depends on two environment variables to be set
587587
///
588-
/// AUTH_CLIENT_ID, the client-id or application
589-
/// AUTH_ISSUER, the issuing service
588+
/// FELDERA_AUTH_CLIENT_ID, the client-id or application
589+
/// FELDERA_AUTH_ISSUER, the issuing service
590590
///
591591
/// ** AWS Cognito provider **
592592
/// If the auth_provider is aws-cognito, there are two more
@@ -607,9 +607,9 @@ pub struct ApiServerConfig {
607607
/// support PKCE soon.
608608
///
609609
/// ** Okta provider **
610-
/// If the auth_provider is okta, the AUTH_ISSUER should be your Okta domain
610+
/// If the auth_provider is okta, the FELDERA_AUTH_ISSUER should be your Okta domain
611611
/// including the authorization server ID (e.g., "<https://your-domain.okta.com/oauth2/default>").
612-
/// The AUTH_CLIENT_ID should be the client ID from your Okta application configuration.
612+
/// The FELDERA_AUTH_CLIENT_ID should be the client ID from your Okta application configuration.
613613
///
614614
/// ** Tenant Assignment **
615615
/// Tenant assignment follows this priority order:

deploy/docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ services:
1313
environment:
1414
- RUST_LOG=info,actix_web=error,tokio_postgres=info
1515
- RUST_BACKTRACE=1
16-
- AUTH_CLIENT_ID
17-
- AUTH_ISSUER
16+
- FELDERA_AUTH_CLIENT_ID
17+
- FELDERA_AUTH_ISSUER
1818
healthcheck:
1919
# TODO: add `/status` endpoint.
2020
test:

docs.feldera.com/docs/contributors/dev-flow.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ In Authenticated mode, you need to login via the Web Console using one of the su
4444

4545
Start the Pipeline Manager in authenticated mode, substituting values from your environment:
4646
```bash
47-
AUTH_CLIENT_ID=<client-id> AUTH_ISSUER=<issuer> <see below for additional environment variables> \
47+
FELDERA_AUTH_CLIENT_ID=<client-id> FELDERA_AUTH_ISSUER=<issuer> <see below for additional environment variables> \
4848
cargo run --bin pipeline-manager -- --auth-provider=aws-cognito
4949
```
5050

@@ -69,15 +69,15 @@ Additional variables for AWS Cognito:
6969

7070
Example:
7171
```bash
72-
AUTH_CLIENT_ID=xxxxxxxxxxxxxxxxxxxxxxxxxx AUTH_ISSUER=https://cognito-idp.us-east-1.amazonaws.com/us-east-1_xxxxxxxxx AWS_COGNITO_LOGIN_URL="https://itest-pool.auth.us-east-1.amazoncognito.com/login\?client_id=xxxxxxxxxxxxxxxxxxxxxxxxxx&response_type=token&scope=email+openid" AWS_COGNITO_LOGOUT_URL="https://itest-pool.auth.us-east-1.amazoncognito.com/logout\?client_id=xxxxxxxxxxxxxxxxxxxxxxxxxx&response_type=token&scope=email+openid" RUST_LOG=debug,tokio_postgres=info cargo run --bin=pipeline-manager -- --dev-mode --auth-provider aws-cognito
72+
FELDERA_AUTH_CLIENT_ID=xxxxxxxxxxxxxxxxxxxxxxxxxx FELDERA_AUTH_ISSUER=https://cognito-idp.us-east-1.amazonaws.com/us-east-1_xxxxxxxxx AWS_COGNITO_LOGIN_URL="https://itest-pool.auth.us-east-1.amazoncognito.com/login\?client_id=xxxxxxxxxxxxxxxxxxxxxxxxxx&response_type=token&scope=email+openid" AWS_COGNITO_LOGOUT_URL="https://itest-pool.auth.us-east-1.amazoncognito.com/logout\?client_id=xxxxxxxxxxxxxxxxxxxxxxxxxx&response_type=token&scope=email+openid" RUST_LOG=debug,tokio_postgres=info cargo run --bin=pipeline-manager -- --dev-mode --auth-provider aws-cognito
7373
```
7474

7575
##### Google Identity Platform
7676
Additional variables for Google Identity Platform: none
7777

7878
Example:
7979
```bash
80-
AUTH_CLIENT_ID=xxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com AUTH_ISSUER="https://accounts.google.com" RUST_LOG=debug,tokio_postgres=info cargo run --bin=pipeline-manager -- --dev-mode --auth-provider google-identity
80+
FELDERA_AUTH_CLIENT_ID=xxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com FELDERA_AUTH_ISSUER="https://accounts.google.com" RUST_LOG=debug,tokio_postgres=info cargo run --bin=pipeline-manager -- --dev-mode --auth-provider google-identity
8181
```
8282

8383
## Run benchmarks

docs.feldera.com/docs/get-started/enterprise/authentication/okta-sso.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -157,15 +157,15 @@ Configure the following environment variables for your Feldera deployment:
157157

158158
```bash
159159
# Okta OIDC configuration
160-
AUTH_ISSUER=https://<your-okta-domain>/oauth2/<custom-auth-server-id>
161-
AUTH_CLIENT_ID=<your-client-id>
160+
FELDERA_AUTH_ISSUER=https://<your-okta-domain>/oauth2/<custom-auth-server-id>
161+
FELDERA_AUTH_CLIENT_ID=<your-client-id>
162162
```
163163

164164
### Optional Variables
165165

166166
```bash
167167
# Custom authorization server (if not using default)
168-
AUTH_ISSUER=https://<your-okta-domain>/oauth2/<custom-auth-server-id>
168+
FELDERA_AUTH_ISSUER=https://<your-okta-domain>/oauth2/<custom-auth-server-id>
169169
```
170170

171171
## Helm Chart Configuration
@@ -214,7 +214,7 @@ Configure Feldera to accept tokens from multiple Okta organizations:
214214

215215
```bash
216216
# Example supporting multiple customers
217-
AUTH_ISSUER=https://customer1.okta.com/oauth2/default,https://customer2.okta.com/oauth2/default
217+
FELDERA_AUTH_ISSUER=https://customer1.okta.com/oauth2/default,https://customer2.okta.com/oauth2/default
218218
```
219219

220220
### 3. Automatic Tenant Assignment
@@ -236,10 +236,10 @@ With `--issuer-tenant=true`, each customer automatically gets their own tenant:
236236

237237
#### "Invalid audience" Error
238238
- **Cause**: Client ID mismatch between Okta app and Feldera config
239-
- **Solution**: Verify `AUTH_CLIENT_ID` matches Okta application client ID
239+
- **Solution**: Verify `FELDERA_AUTH_CLIENT_ID` matches Okta application client ID
240240

241241
#### "Invalid issuer" Error
242242
- **Cause**: Issuer URL mismatch
243-
- **Solution**: Verify `AUTH_ISSUER` matches Okta authorization server URL
243+
- **Solution**: Verify `FELDERA_AUTH_ISSUER` matches Okta authorization server URL
244244

245245
For additional help, consult the [Okta Developer Documentation](https://developer.okta.com/docs/) or contact your Feldera support team.

web-console/bun.lock

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

web-console/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
},
2727
"devDependencies": {
2828
"@auth/sveltekit": "^1.7.4",
29-
"@axa-fr/oidc-client": "^7.25.3",
29+
"@axa-fr/oidc-client": "^7.26.0",
3030
"@bithero/monaco-editor-vite-plugin": "^1.0.2",
3131
"@fontsource-variable/dm-sans": "^5.1.1",
3232
"@fontsource/dm-mono": "^5.1.1",

0 commit comments

Comments
 (0)