airflow-file-auth-manager 0.1.1__py3-none-any.whl → 0.1.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -97,7 +97,7 @@ def create_auth_app(auth_manager: FileAuthManager) -> FastAPI:
97
97
  logger.warning("AUDIT: Login attempt with missing credentials")
98
98
  if is_form_submission:
99
99
  return RedirectResponse(
100
- url="/auth/file/login?error=Username+and+password+required",
100
+ url="/auth/login?error=Username+and+password+required",
101
101
  status_code=303,
102
102
  )
103
103
  return JSONResponse(
@@ -112,7 +112,7 @@ def create_auth_app(auth_manager: FileAuthManager) -> FastAPI:
112
112
  username, request.client.host if request.client else "unknown")
113
113
  if is_form_submission:
114
114
  return RedirectResponse(
115
- url="/auth/file/login?error=Invalid+username+or+password",
115
+ url="/auth/login?error=Invalid+username+or+password",
116
116
  status_code=303,
117
117
  )
118
118
  return JSONResponse(
@@ -167,7 +167,7 @@ def create_auth_app(auth_manager: FileAuthManager) -> FastAPI:
167
167
  logger.info("AUDIT: User logged out (IP: %s)",
168
168
  request.client.host if request.client else "unknown")
169
169
 
170
- redirect_response = RedirectResponse(url="/auth/file/login", status_code=303)
170
+ redirect_response = RedirectResponse(url="/auth/login", status_code=303)
171
171
  redirect_response.delete_cookie(key="airflow_jwt")
172
172
  return redirect_response
173
173
 
@@ -7,7 +7,7 @@ from functools import cached_property
7
7
  from typing import TYPE_CHECKING, Any, Sequence
8
8
  from urllib.parse import urlencode
9
9
 
10
- from airflow.auth.managers.base_auth_manager import BaseAuthManager, ResourceMethod
10
+ from airflow.api_fastapi.auth.managers.base_auth_manager import BaseAuthManager, ResourceMethod
11
11
  from airflow.configuration import conf
12
12
 
13
13
  from airflow_file_auth_manager.policy import FileAuthPolicy, Role
@@ -17,8 +17,8 @@ from airflow_file_auth_manager.user_store import UserStore
17
17
  if TYPE_CHECKING:
18
18
  from fastapi import FastAPI
19
19
 
20
- from airflow.auth.managers.models.base_user import BaseUser
21
- from airflow.auth.managers.models.resource_details import (
20
+ from airflow.api_fastapi.auth.managers.models.base_user import BaseUser
21
+ from airflow.api_fastapi.auth.managers.models.resource_details import (
22
22
  AccessView,
23
23
  AssetAliasDetails,
24
24
  AssetDetails,
@@ -89,14 +89,14 @@ class FileAuthManager(BaseAuthManager[FileUser]):
89
89
 
90
90
  def get_url_login(self, *, next_url: str | None = None) -> str:
91
91
  """Get the login page URL."""
92
- url = "/auth/file/login"
92
+ url = "/auth/login"
93
93
  if next_url:
94
94
  url = f"{url}?{urlencode({'next': next_url})}"
95
95
  return url
96
96
 
97
97
  def get_url_logout(self) -> str:
98
98
  """Get the logout URL."""
99
- return "/auth/file/logout"
99
+ return "/auth/logout"
100
100
 
101
101
  # =========================================================================
102
102
  # Serialization Methods (for JWT)
@@ -6,13 +6,13 @@ from enum import Enum
6
6
  from typing import TYPE_CHECKING
7
7
 
8
8
  if TYPE_CHECKING:
9
- from airflow.auth.managers.models.resource_details import (
9
+ from airflow.api_fastapi.auth.managers.models.resource_details import (
10
10
  AccessView,
11
+ AssetDetails,
11
12
  ConfigurationDetails,
12
13
  ConnectionDetails,
13
14
  DagAccessEntity,
14
15
  DagDetails,
15
- DatasetDetails,
16
16
  PoolDetails,
17
17
  VariableDetails,
18
18
  )
@@ -127,7 +127,7 @@ class FileAuthPolicy:
127
127
  *,
128
128
  method: str,
129
129
  user_role: str,
130
- details: DatasetDetails | None = None,
130
+ details: AssetDetails | None = None,
131
131
  ) -> bool:
132
132
  """Check if user can access datasets."""
133
133
  if method in cls.READ_ONLY_METHODS:
@@ -195,7 +195,7 @@
195
195
 
196
196
  <p class="description">Enter your username and password below:</p>
197
197
 
198
- <form action="/auth/file/token" method="POST">
198
+ <form action="/auth/token" method="POST">
199
199
  <input type="hidden" name="next" value="{{ next_url }}">
200
200
 
201
201
  <div class="form-group">
@@ -1,9 +1,12 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: airflow-file-auth-manager
3
- Version: 0.1.1
3
+ Version: 0.1.3
4
4
  Summary: YAML file-based lightweight Auth Manager for Apache Airflow 3.x
5
- Project-URL: Homepage, https://github.com/yeonguk/airflow-file-auth-manager
6
- Project-URL: Repository, https://github.com/yeonguk/airflow-file-auth-manager
5
+ Project-URL: Homepage, https://github.com/choo121600/airflow-file-auth-manager
6
+ Project-URL: Repository, https://github.com/choo121600/airflow-file-auth-manager
7
+ Project-URL: Documentation, https://github.com/choo121600/airflow-file-auth-manager#readme
8
+ Project-URL: Issues, https://github.com/choo121600/airflow-file-auth-manager/issues
9
+ Project-URL: Changelog, https://github.com/choo121600/airflow-file-auth-manager/releases
7
10
  Author-email: Yeonguk <yeonguk@example.com>
8
11
  License-Expression: Apache-2.0
9
12
  License-File: LICENSE
@@ -28,9 +31,11 @@ Description-Content-Type: text/markdown
28
31
 
29
32
  A lightweight YAML file-based Auth Manager for Apache Airflow 3.x
30
33
 
34
+ [![PyPI version](https://badge.fury.io/py/airflow-file-auth-manager.svg)](https://pypi.org/project/airflow-file-auth-manager/)
31
35
  [![Python 3.11+](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/downloads/)
32
36
  [![Apache Airflow 3.x](https://img.shields.io/badge/airflow-3.x-017cee.svg)](https://airflow.apache.org/)
33
37
  [![License](https://img.shields.io/badge/license-Apache%202.0-green.svg)](LICENSE)
38
+ [![CI](https://github.com/choo121600/airflow-file-auth-manager/actions/workflows/ci.yml/badge.svg)](https://github.com/choo121600/airflow-file-auth-manager/actions/workflows/ci.yml)
34
39
 
35
40
  ## Overview
36
41
 
@@ -47,7 +52,7 @@ A lightweight YAML file-based Auth Manager for Apache Airflow 3.x
47
52
 
48
53
  ## Installation
49
54
 
50
- ### From PyPI (coming soon)
55
+ ### From PyPI
51
56
 
52
57
  ```bash
53
58
  pip install airflow-file-auth-manager
@@ -56,7 +61,7 @@ pip install airflow-file-auth-manager
56
61
  ### From Source
57
62
 
58
63
  ```bash
59
- git clone https://github.com/yeonguk/airflow-file-auth-manager.git
64
+ git clone https://github.com/choo121600/airflow-file-auth-manager.git
60
65
  cd airflow-file-auth-manager
61
66
  pip install -e .
62
67
  ```
@@ -0,0 +1,15 @@
1
+ airflow_file_auth_manager/__init__.py,sha256=M1nQascdVasmnx9yih96Htl-Z626KIVAtALBJ9KyCd0,993
2
+ airflow_file_auth_manager/cli.py,sha256=seJ5Vu1R763DFVfd3tsBIk6RaGIXlarB1gSu3WVv03c,8935
3
+ airflow_file_auth_manager/endpoints.py,sha256=3kWPYAAOdSH3eMKzu92Q0PkG4GtVDugaeTRbu_TnRwc,6207
4
+ airflow_file_auth_manager/file_auth_manager.py,sha256=hRTudfXHL6c0OMptArFmSP1vWbNsBpfHRbTtsLfO1e4,13081
5
+ airflow_file_auth_manager/password.py,sha256=C-a6vjOxnht9X4OE_xrlvWH1DaEMJwK9OV20fE0OQJ8,2689
6
+ airflow_file_auth_manager/policy.py,sha256=luj1EhVAKLZxubr7h4Au171-R1Q_HmGb78QEWqWQync,5159
7
+ airflow_file_auth_manager/user.py,sha256=lxskYF8rQGEzgxKu6NzDtXLPtNRY2AspBKu89RiIEZg,2278
8
+ airflow_file_auth_manager/user_store.py,sha256=VV1D0vWlm5Z_l-bcXLEQpueY5Gfx7xUdUqBpFDLlLIA,11717
9
+ airflow_file_auth_manager/static/styles.css,sha256=-gxvqlQCHpZtif-93OpqgcyYTe__9Sr92Np-9N97S04,1675
10
+ airflow_file_auth_manager/templates/login.html,sha256=OMHv2c6OsnMsKKXYFaQwnHzVtAjUQe9HSZgoaI2DGY8,8387
11
+ airflow_file_auth_manager-0.1.3.dist-info/METADATA,sha256=di8NdKUQ8WH73T2T0h2doIAvF4LHXsvL9zYrBb1h6Fo,11041
12
+ airflow_file_auth_manager-0.1.3.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
13
+ airflow_file_auth_manager-0.1.3.dist-info/entry_points.txt,sha256=bQgxFNgbmAewrv9RAZ_tYUNZy5IxS_Zhlj6vgG9lbqY,168
14
+ airflow_file_auth_manager-0.1.3.dist-info/licenses/LICENSE,sha256=fw8CKBXZ_-V6K5pxfUmJP3e_7QUvFq8XncuZ27tvarg,10177
15
+ airflow_file_auth_manager-0.1.3.dist-info/RECORD,,
@@ -1,15 +0,0 @@
1
- airflow_file_auth_manager/__init__.py,sha256=M1nQascdVasmnx9yih96Htl-Z626KIVAtALBJ9KyCd0,993
2
- airflow_file_auth_manager/cli.py,sha256=seJ5Vu1R763DFVfd3tsBIk6RaGIXlarB1gSu3WVv03c,8935
3
- airflow_file_auth_manager/endpoints.py,sha256=SDPRs0DLAl500VouvknpJTvIoIKpBySPzPDsLUJaEKs,6222
4
- airflow_file_auth_manager/file_auth_manager.py,sha256=-bCctN8TeixXqvX_ZlS47vq62LN-bq19H9AAMKV-WP0,13055
5
- airflow_file_auth_manager/password.py,sha256=C-a6vjOxnht9X4OE_xrlvWH1DaEMJwK9OV20fE0OQJ8,2689
6
- airflow_file_auth_manager/policy.py,sha256=TUKu2ytBHNH5j6hOBRzaxcnOhGVUK4jL1DGcVSGMtbI,5151
7
- airflow_file_auth_manager/user.py,sha256=lxskYF8rQGEzgxKu6NzDtXLPtNRY2AspBKu89RiIEZg,2278
8
- airflow_file_auth_manager/user_store.py,sha256=VV1D0vWlm5Z_l-bcXLEQpueY5Gfx7xUdUqBpFDLlLIA,11717
9
- airflow_file_auth_manager/static/styles.css,sha256=-gxvqlQCHpZtif-93OpqgcyYTe__9Sr92Np-9N97S04,1675
10
- airflow_file_auth_manager/templates/login.html,sha256=jPUyUzrUUc8USzBIuql1itcHUok7SrwVjWsZ-xhrnIA,8392
11
- airflow_file_auth_manager-0.1.1.dist-info/METADATA,sha256=1ZPCs8DmTecqAdbNnPqLvML3xkxAtWk68lKOVPJlazs,10473
12
- airflow_file_auth_manager-0.1.1.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
13
- airflow_file_auth_manager-0.1.1.dist-info/entry_points.txt,sha256=bQgxFNgbmAewrv9RAZ_tYUNZy5IxS_Zhlj6vgG9lbqY,168
14
- airflow_file_auth_manager-0.1.1.dist-info/licenses/LICENSE,sha256=fw8CKBXZ_-V6K5pxfUmJP3e_7QUvFq8XncuZ27tvarg,10177
15
- airflow_file_auth_manager-0.1.1.dist-info/RECORD,,