File tree Expand file tree Collapse file tree 3 files changed +18
-0
lines changed Expand file tree Collapse file tree 3 files changed +18
-0
lines changed Original file line number Diff line number Diff line change 33## Release v0.74.0
44
55### New Features and Improvements
6+ * Add new auth type (` runtime-oauth ` ) for notebooks: Introduce a new authentication mechanism that allows notebooks to authenticate using OAuth tokens
67
78### Security
89
Original file line number Diff line number Diff line change @@ -113,6 +113,7 @@ class Config:
113113 disable_experimental_files_api_client : bool = ConfigAttribute (
114114 env = "DATABRICKS_DISABLE_EXPERIMENTAL_FILES_API_CLIENT"
115115 )
116+ # TODO: Expose these via environment variables too.
116117 scopes : str = ConfigAttribute ()
117118 authorization_details : str = ConfigAttribute ()
118119
Original file line number Diff line number Diff line change @@ -760,6 +760,22 @@ def refresh(self) -> Token:
760760
761761@dataclass
762762class PATOAuthTokenExchange (Refreshable ):
763+ """Performs OAuth token exchange using a Personal Access Token (PAT) as the subject token.
764+
765+ This class implements the OAuth 2.0 Token Exchange flow (RFC 8693) to exchange a Databricks
766+ Internal PAT Token for an access token with specific scopes and authorization details.
767+
768+ Args:
769+ get_original_token: A callable that returns the PAT to be exchanged. This is a callable
770+ rather than a string value to ensure that a fresh Internal PAT Token is retrieved
771+ at the time of refresh.
772+ host: The Databricks workspace URL (e.g., "https://my-workspace.cloud.databricks.com").
773+ scopes: Space-delimited string of OAuth scopes to request (e.g., "all-apis offline_access").
774+ authorization_details: Optional JSON string containing authorization details as defined in
775+ AuthorizationDetail class above.
776+ disable_async: Whether to disable asynchronous token refresh. Defaults to True.
777+ """
778+
763779 get_original_token : Callable [[], Optional [str ]]
764780 host : str
765781 scopes : str
You can’t perform that action at this time.
0 commit comments