@@ -1168,8 +1168,8 @@ class ViewUpdate(BaseModel):
11681168 ]
11691169
11701170
1171- class Credentials (BaseModel ):
1172- __root__ : Union [ADLSCredentials , GCSCredentials , S3Credentials ] = Field (
1171+ class Credential (BaseModel ):
1172+ __root__ : Union [ADLSCredential , GCSCredential , S3Credential ] = Field (
11731173 ..., discriminator = 'type'
11741174 )
11751175
@@ -1201,10 +1201,11 @@ class LoadTableResult(BaseModel):
12011201 - `s3.session-token`: if present, this value should be used for as the session token
12021202 - `s3.remote-signing-enabled`: if `true` remote signing should be performed as described in the `s3-signer-open-api.yaml` specification
12031203
1204- ## Credentials
1204+ ## Storage Credentials
12051205
1206- Credentials for ADLS / GCS / S3 are provided through the `credentials` field. Clients should first check whether the
1207- respective credentials exist in the `credentials` field before checking the `config` for credentials.
1206+ Credentials for ADLS / GCS / S3 are provided through the `storage-credentials` field.
1207+ In order to avoid leaking non-expiring credentials, all credentials are required to have an expiration.
1208+ Clients should first check whether the respective credentials exist in the `storage-credentials` field before checking the `config` for credentials.
12081209
12091210 """
12101211
@@ -1214,7 +1215,9 @@ class LoadTableResult(BaseModel):
12141215 description = 'May be null if the table is staged as part of a transaction' ,
12151216 )
12161217 metadata : TableMetadata
1217- credentials : Optional [Credentials ] = None
1218+ storage_credentials : Optional [List [Credential ]] = Field (
1219+ None , alias = 'storage-credentials'
1220+ )
12181221 config : Optional [Dict [str , str ]] = None
12191222
12201223
@@ -1323,16 +1326,19 @@ class LoadViewResult(BaseModel):
13231326
13241327 - `token`: Authorization bearer token to use for view requests if OAuth2 security is enabled
13251328
1326- ## Credentials
1329+ ## Storage Credentials
13271330
1328- Credentials for ADLS / GCS / S3 are provided through the `credentials` field. Clients should first check whether the
1329- respective credentials exist in the `credentials` field before checking the `config` for credentials.
1331+ Credentials for ADLS / GCS / S3 are provided through the `storage-credentials` field.
1332+ In order to avoid leaking non-expiring credentials, all credentials are required to have an expiration.
1333+ Clients should first check whether the respective credentials exist in the `storage-credentials` field before checking the `config` for credentials.
13301334
13311335 """
13321336
13331337 metadata_location : str = Field (..., alias = 'metadata-location' )
13341338 metadata : ViewMetadata
1335- credentials : Optional [Credentials ] = None
1339+ storage_credentials : Optional [List [Credential ]] = Field (
1340+ None , alias = 'storage-credentials'
1341+ )
13361342 config : Optional [Dict [str , str ]] = None
13371343
13381344
@@ -1416,35 +1422,38 @@ class Schema(StructType):
14161422 )
14171423
14181424
1419- class ADLSCredentials (BaseModel ):
1425+ class ADLSCredential (BaseModel ):
14201426 type : Literal ['adls' ]
1427+ scheme : str
14211428 sas_token : str = Field (..., alias = 'sas-token' )
14221429 expires_at_ms : int = Field (
14231430 ...,
14241431 alias = 'expires-at-ms' ,
1425- description = 'The epoch millis at which the given token expires' ,
1432+ description = 'The epoch millis since 1970-01-01T00:00:00Z at which the given token expires' ,
14261433 )
14271434
14281435
1429- class GCSCredentials (BaseModel ):
1436+ class GCSCredential (BaseModel ):
14301437 type : Literal ['gcs' ]
1438+ scheme : str
14311439 token : str
14321440 expires_at_ms : int = Field (
14331441 ...,
14341442 alias = 'expires-at-ms' ,
1435- description = 'The epoch millis at which the given token expires' ,
1443+ description = 'The epoch millis since 1970-01-01T00:00:00Z at which the given token expires' ,
14361444 )
14371445
14381446
1439- class S3Credentials (BaseModel ):
1447+ class S3Credential (BaseModel ):
14401448 type : Literal ['s3' ]
1449+ scheme : str
14411450 access_key_id : str = Field (..., alias = 'access-key-id' )
14421451 secret_access_key : str = Field (..., alias = 'secret-access-key' )
14431452 session_token : str = Field (..., alias = 'session-token' )
14441453 expires_at_ms : int = Field (
14451454 ...,
14461455 alias = 'expires-at-ms' ,
1447- description = 'The epoch millis at which the given token expires' ,
1456+ description = 'The epoch millis since 1970-01-01T00:00:00Z at which the given token expires' ,
14481457 )
14491458
14501459
@@ -1480,16 +1489,16 @@ class CompletedPlanningWithIDResult(CompletedPlanningResult):
14801489TableMetadata .update_forward_refs ()
14811490ViewMetadata .update_forward_refs ()
14821491AddSchemaUpdate .update_forward_refs ()
1483- Credentials .update_forward_refs ()
1492+ Credential .update_forward_refs ()
14841493ScanTasks .update_forward_refs ()
14851494FetchPlanningResult .update_forward_refs ()
14861495PlanTableScanResult .update_forward_refs ()
14871496CreateTableRequest .update_forward_refs ()
14881497CreateViewRequest .update_forward_refs ()
14891498ReportMetricsRequest .update_forward_refs ()
1490- ADLSCredentials .update_forward_refs ()
1491- GCSCredentials .update_forward_refs ()
1492- S3Credentials .update_forward_refs ()
1499+ ADLSCredential .update_forward_refs ()
1500+ GCSCredential .update_forward_refs ()
1501+ S3Credential .update_forward_refs ()
14931502CompletedPlanningResult .update_forward_refs ()
14941503FetchScanTasksResult .update_forward_refs ()
14951504CompletedPlanningWithIDResult .update_forward_refs ()
0 commit comments