agentauthlayer 0.1.5__tar.gz → 0.1.7__tar.gz
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.
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/PKG-INFO +1 -1
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/agent_auth/server_runtime.py +26 -14
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/agentauthlayer.egg-info/PKG-INFO +1 -1
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/auth_app/api/routes/policy.py +1 -1
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/auth_app/repositories/sqlite_user_repo.py +6 -3
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/pyproject.toml +1 -1
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/MANIFEST.in +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/README.md +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/agent_auth/__init__.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/agent_auth/__main__.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/agent_auth/agents.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/agent_auth/audit.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/agent_auth/auth.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/agent_auth/cli.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/agent_auth/client.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/agent_auth/context.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/agent_auth/core.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/agent_auth/credentials.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/agent_auth/delegation.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/agent_auth/exceptions.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/agent_auth/models.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/agent_auth/policy.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/agent_auth/policy_service.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/agent_auth/principals.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/agent_auth/registry.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/agent_auth/runtime.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/agent_auth/session.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/agent_auth/storage.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/agent_auth/tokens.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/agent_auth/users.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/agent_auth/web_dist/assets/index-BBJ7rinV.css +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/agent_auth/web_dist/assets/index-DXUoW2DG.js +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/agent_auth/web_dist/favicon.ico +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/agent_auth/web_dist/grid.svg +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/agent_auth/web_dist/index.html +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/agent_auth/web_dist/placeholder.svg +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/agent_auth/web_dist/robots.txt +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/agent_auth_definitive_guide.pdf +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/agentauthlayer.egg-info/SOURCES.txt +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/agentauthlayer.egg-info/dependency_links.txt +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/agentauthlayer.egg-info/entry_points.txt +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/agentauthlayer.egg-info/requires.txt +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/agentauthlayer.egg-info/top_level.txt +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/auth_app/__init__.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/auth_app/api/__init__.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/auth_app/api/routes/__init__.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/auth_app/api/routes/agents.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/auth_app/api/routes/audit.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/auth_app/api/routes/auth.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/auth_app/api/routes/bootstrap.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/auth_app/api/routes/health.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/auth_app/api/routes/projects.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/auth_app/api/routes/tokens.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/auth_app/api/routes/users.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/auth_app/core/__init__.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/auth_app/core/config.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/auth_app/core/db.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/auth_app/core/errors.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/auth_app/core/logging.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/auth_app/dependencies/__init__.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/auth_app/dependencies/auth.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/auth_app/dependencies/security.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/auth_app/dependencies/user.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/auth_app/domain/__init__.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/auth_app/domain/enums.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/auth_app/domain/models.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/auth_app/main.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/auth_app/middleware/__init__.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/auth_app/middleware/correlation.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/auth_app/repositories/__init__.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/auth_app/repositories/agent_repo.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/auth_app/repositories/audit_repo.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/auth_app/repositories/constraint_repo.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/auth_app/repositories/contracts.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/auth_app/repositories/delegation_repo.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/auth_app/repositories/project_repo.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/auth_app/repositories/role_repo.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/auth_app/repositories/sqlite_agent_repo.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/auth_app/repositories/sqlite_audit_repo.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/auth_app/repositories/sqlite_constraint_repo.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/auth_app/repositories/sqlite_delegation_repo.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/auth_app/repositories/sqlite_permission_repo.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/auth_app/repositories/sqlite_project_repo.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/auth_app/repositories/sqlite_role_repo.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/auth_app/repositories/sqlite_token_repo.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/auth_app/repositories/token_repo.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/auth_app/repositories/user_repo.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/auth_app/schemas/__init__.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/auth_app/schemas/agent.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/auth_app/schemas/audit.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/auth_app/schemas/auth.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/auth_app/schemas/bootstrap.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/auth_app/schemas/device_agents.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/auth_app/schemas/policy.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/auth_app/schemas/project.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/auth_app/schemas/token.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/auth_app/schemas/user.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/auth_app/services/__init__.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/auth_app/services/agent_service.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/auth_app/services/audit_service.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/auth_app/services/device_agent_service.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/auth_app/services/policy_service.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/auth_app/services/project_service.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/auth_app/services/token_service.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/auth_app/services/user_service.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/setup.cfg +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/tests/test_agent_auth_library.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/tests/test_auth_flow.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/tests/test_core_first_boundary.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/tests/test_health.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/tests/test_iam_policy.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/tests/test_project_flow.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/tests/test_sqlite_repos.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/tests/test_storage.py +0 -0
- {agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/tests/test_tool_registry.py +0 -0
|
@@ -17,25 +17,36 @@ DEFAULT_PORT = 8002
|
|
|
17
17
|
DEFAULT_BASE_URL = f"http://{DEFAULT_HOST}:{DEFAULT_PORT}"
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
def
|
|
20
|
+
def fallback_data_dir() -> Path:
|
|
21
21
|
return Path.home() / ".agentauth"
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
def
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
def project_state_dir() -> Path:
|
|
25
|
+
return Path.cwd() / ".agentauth"
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def local_data_dir() -> Path:
|
|
29
|
+
explicit_state_dir = os.getenv("AGENTAUTH_STATE_DIR")
|
|
30
|
+
if explicit_state_dir:
|
|
31
|
+
return Path(explicit_state_dir).expanduser().resolve()
|
|
32
|
+
|
|
33
|
+
cwd = Path.cwd()
|
|
34
|
+
if cwd.exists() and cwd.is_dir():
|
|
35
|
+
return project_state_dir()
|
|
36
|
+
|
|
37
|
+
return fallback_data_dir()
|
|
27
38
|
|
|
28
39
|
|
|
29
|
-
def local_db_path(
|
|
30
|
-
return local_data_dir() /
|
|
40
|
+
def local_db_path() -> Path:
|
|
41
|
+
return local_data_dir() / "auth.db"
|
|
31
42
|
|
|
32
43
|
|
|
33
|
-
def local_log_path(
|
|
34
|
-
return local_data_dir() /
|
|
44
|
+
def local_log_path() -> Path:
|
|
45
|
+
return local_data_dir() / "server.log"
|
|
35
46
|
|
|
36
47
|
|
|
37
|
-
def local_pid_path(
|
|
38
|
-
return local_data_dir() /
|
|
48
|
+
def local_pid_path() -> Path:
|
|
49
|
+
return local_data_dir() / "server.pid"
|
|
39
50
|
|
|
40
51
|
|
|
41
52
|
def ensure_local_env(host: str = DEFAULT_HOST, port: int = DEFAULT_PORT) -> dict[str, str]:
|
|
@@ -44,9 +55,10 @@ def ensure_local_env(host: str = DEFAULT_HOST, port: int = DEFAULT_PORT) -> dict
|
|
|
44
55
|
|
|
45
56
|
env = os.environ.copy()
|
|
46
57
|
env.setdefault("STORAGE_BACKEND", "sqlite")
|
|
47
|
-
env.setdefault("DATABASE_URL", f"sqlite:///{local_db_path(
|
|
58
|
+
env.setdefault("DATABASE_URL", f"sqlite:///{local_db_path()}")
|
|
48
59
|
env.setdefault("JWT_SECRET_KEY", f"agentauth_local_{secrets.token_urlsafe(24)}")
|
|
49
60
|
env.setdefault("CORS_ORIGINS", "*")
|
|
61
|
+
env.setdefault("AGENTAUTH_STATE_DIR", str(data_dir))
|
|
50
62
|
return env
|
|
51
63
|
|
|
52
64
|
|
|
@@ -59,7 +71,7 @@ def is_running(pid: int) -> bool:
|
|
|
59
71
|
|
|
60
72
|
|
|
61
73
|
def read_pid(host: str = DEFAULT_HOST, port: int = DEFAULT_PORT) -> int | None:
|
|
62
|
-
pid_path = local_pid_path(
|
|
74
|
+
pid_path = local_pid_path()
|
|
63
75
|
if not pid_path.exists():
|
|
64
76
|
return None
|
|
65
77
|
try:
|
|
@@ -69,7 +81,7 @@ def read_pid(host: str = DEFAULT_HOST, port: int = DEFAULT_PORT) -> int | None:
|
|
|
69
81
|
|
|
70
82
|
|
|
71
83
|
def write_pid(pid: int, host: str = DEFAULT_HOST, port: int = DEFAULT_PORT) -> None:
|
|
72
|
-
local_pid_path(
|
|
84
|
+
local_pid_path().write_text(str(pid))
|
|
73
85
|
|
|
74
86
|
|
|
75
87
|
def server_url(host: str = DEFAULT_HOST, port: int = DEFAULT_PORT) -> str:
|
|
@@ -96,7 +108,7 @@ def start_local_server(host: str = DEFAULT_HOST, port: int = DEFAULT_PORT) -> tu
|
|
|
96
108
|
return None, base_url
|
|
97
109
|
|
|
98
110
|
env = ensure_local_env(host, port)
|
|
99
|
-
log_path = local_log_path(
|
|
111
|
+
log_path = local_log_path()
|
|
100
112
|
log_path.parent.mkdir(parents=True, exist_ok=True)
|
|
101
113
|
|
|
102
114
|
cmd = [
|
|
@@ -74,7 +74,7 @@ def upsert_role(
|
|
|
74
74
|
def list_permissions(policy_service: PolicyService = Depends(get_policy_service)) -> list[PermissionResponse]:
|
|
75
75
|
return [
|
|
76
76
|
PermissionResponse(action=permission.action, description=permission.description)
|
|
77
|
-
for permission in policy_service.list_permissions()
|
|
77
|
+
for permission in policy_service.list_permissions(include_defaults=False)
|
|
78
78
|
]
|
|
79
79
|
|
|
80
80
|
|
|
@@ -50,9 +50,12 @@ class SQLiteUserRepository(UserRepositoryProtocol):
|
|
|
50
50
|
self._conn.commit()
|
|
51
51
|
|
|
52
52
|
def get_admin_hash(self) -> str | None:
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
53
|
+
for email in ("admin@agentauth.dev", "admin@agent-auth.local"):
|
|
54
|
+
cur = self._conn.execute("SELECT password_hash FROM users WHERE email = ?", (email,))
|
|
55
|
+
row = cur.fetchone()
|
|
56
|
+
if row:
|
|
57
|
+
return row[0]
|
|
58
|
+
return None
|
|
56
59
|
|
|
57
60
|
def set_admin_hash(self, password_hash: str) -> None:
|
|
58
61
|
user = self.get_user_by_email('admin@agent-auth.local')
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/auth_app/repositories/sqlite_constraint_repo.py
RENAMED
|
File without changes
|
{agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/auth_app/repositories/sqlite_delegation_repo.py
RENAMED
|
File without changes
|
{agentauthlayer-0.1.5 → agentauthlayer-0.1.7}/auth_app/repositories/sqlite_permission_repo.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|