You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: mkdocs/docs/configuration.md
+27-98Lines changed: 27 additions & 98 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -384,13 +384,15 @@ Legacy OAuth2 Properties will be removed in PyIceberg 1.0 in place of pluggable
384
384
385
385
The RESTCatalog supports pluggable authentication via the `auth` configuration block. This allows you to specify which how the access token will be fetched and managed for use with the HTTP requests to the RESTCatalog server. The authentication method is selected by setting the `auth.type` property, and additional configuration can be provided as needed for each method.
386
386
387
-
###### Supported Authentication Types
387
+
##### Supported Authentication Types
388
388
389
389
- `noop`: No authentication (no Authorization header sent).
390
390
- `basic`: HTTP Basic authentication.
391
+
- `oauth2`: OAuth2 client credentials flow.
392
+
- `legacyoauth2`: Legacy OAuth2 client credentials flow (Deprecated and will be removed in PyIceberg 1.0.0)
| `auth.type` | Yes | The authentication type to use (`noop`, `basic`, or `custom`). |
415
+
| `auth.type` | Yes | The authentication type to use (`noop`, `basic`, `oauth2`, or `custom`). |
414
416
| `auth.impl` | Conditionally | The fully qualified class path for a custom AuthManager. Required if `auth.type` is `custom`. |
415
417
| `auth.basic` | If type is `basic` | Block containing `username` and `password` for HTTP Basic authentication. |
418
+
| `auth.oauth2` | If type is `oauth2` | Block containing OAuth2 configuration (see below). |
416
419
| `auth.custom` | If type is `custom` | Block containing configuration for the custom AuthManager. |
417
420
418
-
###### Examples
421
+
##### Examples
419
422
420
-
No Authentication:
423
+
**No Authentication:**
421
424
422
425
```yaml
423
426
auth:
424
427
type: noop
425
428
```
426
429
427
-
Basic Authentication:
430
+
**Basic Authentication:**
428
431
429
432
```yaml
430
433
auth:
@@ -434,7 +437,21 @@ auth:
434
437
password: mypass
435
438
```
436
439
437
-
Custom Authentication:
440
+
**OAuth2 Authentication:**
441
+
442
+
```yaml
443
+
auth:
444
+
type: oauth2
445
+
oauth2:
446
+
client_id: my-client-id
447
+
client_secret: my-client-secret
448
+
token_url: https://auth.example.com/oauth/token
449
+
scope: read
450
+
refresh_margin: 60 # (optional) seconds before expiry to refresh
451
+
expires_in: 3600 # (optional) fallback if server does not provide
452
+
```
453
+
454
+
**Custom Authentication:**
438
455
439
456
```yaml
440
457
auth:
@@ -445,11 +462,11 @@ auth:
445
462
property2: value2
446
463
```
447
464
448
-
###### Notes
465
+
##### Notes
449
466
450
467
- If `auth.type` is `custom`, you **must** specify `auth.impl` with the full class path to your custom AuthManager.
451
468
- If `auth.type` is not `custom`, specifying `auth.impl` is not allowed.
452
-
- The configuration block under each type (e.g., `basic`, `custom`) is passed as keyword arguments to the corresponding AuthManager.
469
+
- The configuration block under each type (e.g., `basic`, `oauth2`, `custom`) is passed as keyword arguments to the corresponding AuthManager.
453
470
454
471
<!-- markdown-link-check-enable-->
455
472
@@ -518,94 +535,6 @@ catalog:
518
535
py-io-impl: pyiceberg.io.fsspec.FsspecFileIO
519
536
```
520
537
521
-
#### Authentication in RESTCatalog
522
-
523
-
The RESTCatalog supports pluggable authentication via the `auth` configuration block. This allows you to specify which how the access token will be fetched and managed for use with the HTTP requests to the RESTCatalog server. The authentication method is selected by setting the `auth.type` property, and additional configuration can be provided as needed for each method.
524
-
525
-
##### Supported Authentication Types
526
-
527
-
- `noop`: No authentication (no Authorization header sent).
528
-
- `basic`: HTTP Basic authentication.
529
-
- `oauth2`: OAuth2 client credentials flow.
530
-
- `legacyoauth2`: Legacy OAuth2 client credentials flow (Deprecated and will be removed in PyIceberg 1.0.0)
| `auth.type` | Yes | The authentication type to use (`noop`, `basic`, `oauth2`, or `custom`). |
554
-
| `auth.impl` | Conditionally | The fully qualified class path for a custom AuthManager. Required if `auth.type` is `custom`. |
555
-
| `auth.basic` | If type is `basic` | Block containing `username` and `password` for HTTP Basic authentication. |
556
-
| `auth.oauth2` | If type is `oauth2` | Block containing OAuth2 configuration (see below). |
557
-
| `auth.custom` | If type is `custom` | Block containing configuration for the custom AuthManager. |
558
-
559
-
##### Examples
560
-
561
-
**No Authentication:**
562
-
563
-
```yaml
564
-
auth:
565
-
type: noop
566
-
```
567
-
568
-
**Basic Authentication:**
569
-
570
-
```yaml
571
-
auth:
572
-
type: basic
573
-
basic:
574
-
username: myuser
575
-
password: mypass
576
-
```
577
-
578
-
**OAuth2 Authentication:**
579
-
580
-
```yaml
581
-
auth:
582
-
type: oauth2
583
-
oauth2:
584
-
client_id: my-client-id
585
-
client_secret: my-client-secret
586
-
token_url: https://auth.example.com/oauth/token
587
-
scope: read
588
-
refresh_margin: 60 # (optional) seconds before expiry to refresh
589
-
expires_in: 3600 # (optional) fallback if server does not provide
590
-
```
591
-
592
-
**Custom Authentication:**
593
-
594
-
```yaml
595
-
auth:
596
-
type: custom
597
-
impl: mypackage.module.MyAuthManager
598
-
custom:
599
-
property1: value1
600
-
property2: value2
601
-
```
602
-
603
-
##### Notes
604
-
605
-
- If `auth.type` is `custom`, you **must** specify `auth.impl` with the full class path to your custom AuthManager.
606
-
- If `auth.type` is not `custom`, specifying `auth.impl` is not allowed.
607
-
- The configuration block under each type (e.g., `basic`, `oauth2`, `custom`) is passed as keyword arguments to the corresponding AuthManager.
608
-
609
538
### SQL Catalog
610
539
611
540
The SQL catalog requires a database for its backend. PyIceberg supports PostgreSQL and SQLite through psycopg2. The database connection has to be configured using the `uri` property. The init_catalog_tables is optional and defaults to True. If it is set to False, the catalog tables will not be created when the SQLCatalog is initialized. See SQLAlchemy's [documentation for URL format](https://docs.sqlalchemy.org/en/20/core/engines.html#backend-specific-urls):
0 commit comments