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: docs/authentication.md
+5-92Lines changed: 5 additions & 92 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,8 @@ dapi authenticates with DesignSafe via the TAPIS v3 API. Credentials are resolve
7
7
3.`.env` file in your project directory
8
8
4. Interactive prompts
9
9
10
+
On [DesignSafe JupyterHub](https://jupyter.designsafe-ci.org), authentication is handled automatically. The sections below are for running dapi from a laptop, CI pipeline, or other environment.
11
+
10
12
## Environment Variables
11
13
12
14
```bash
@@ -65,87 +67,13 @@ ds = DSClient(
65
67
)
66
68
```
67
69
68
-
## TMS Credentials (Execution System Access)
69
-
70
-
After authenticating with DesignSafe, you need TMS credentials on execution systems where you plan to submit jobs. TMS manages SSH key pairs that allow Tapis to access TACC systems (Frontera, Stampede3, Lonestar6) on your behalf.
71
-
72
-
:::{note} One-time setup
73
-
TMS credentials only need to be established once per system. After that, they persist until you revoke them.
74
-
:::
70
+
## TMS Credentials
75
71
76
-
### Establish Credentials
77
-
78
-
```python
79
-
ds = DSClient()
80
-
81
-
ds.systems.establish_credentials("frontera")
82
-
ds.systems.establish_credentials("stampede3")
83
-
ds.systems.establish_credentials("ls6")
84
-
```
85
-
86
-
If credentials already exist, `establish_credentials` does nothing (idempotent). To force re-creation:
TMS credentials work from any environment -- not just DesignSafe JupyterHub. As long as you can authenticate with Tapis (e.g., via `.env` file), you can manage TMS credentials from your laptop, CI/CD pipelines, or any Python script:
110
-
111
-
```python
112
-
from dapi import DSClient
113
-
114
-
ds = DSClient()
115
-
ds.systems.establish_credentials("frontera")
116
-
117
-
# Now submit jobs as usual
118
-
job_request = ds.jobs.generate(...)
119
-
job = ds.jobs.submit(job_request)
120
-
```
121
-
122
-
### Troubleshooting TMS
123
-
124
-
**Non-TMS System:**
125
-
```
126
-
CredentialError: System 'my-system' uses authentication method 'PASSWORD', not 'TMS_KEYS'.
127
-
```
128
-
TMS credential management only works for systems configured with `TMS_KEYS` authentication. TACC execution systems (frontera, stampede3, ls6) use TMS_KEYS.
129
-
130
-
**System Not Found:**
131
-
```
132
-
CredentialError: System 'nonexistent' not found.
133
-
```
134
-
Verify the system ID. Common system IDs: `frontera`, `stampede3`, `ls6`.
72
+
After authenticating, dapi needs SSH credentials on TACC execution systems to submit jobs. `DSClient()` sets these up automatically on first use. See [Systems](systems.md) for manual TMS credential management.
135
73
136
74
## Database Connections
137
75
138
-
Database connections use built-in public read-only credentials by default -- no `.env` setup is required. To override the defaults (e.g., for a private database instance), set environment variables:
139
-
140
-
```bash
141
-
# Optional: override database credentials
142
-
NGL_DB_USER=your_user
143
-
NGL_DB_PASSWORD=your_password
144
-
NGL_DB_HOST=your_host
145
-
NGL_DB_PORT=3306
146
-
```
147
-
148
-
The same pattern applies for VP (`VP_DB_*`) and Earthquake Recovery (`EQ_DB_*`) databases.
76
+
Database connections use built-in public read-only credentials by default. No setup is required. See [Database Access](database.md) for override options.
149
77
150
78
## JWT Token Expiration
151
79
@@ -161,8 +89,6 @@ Reinitialize your client to refresh tokens:
161
89
ds = DSClient()
162
90
```
163
91
164
-
Tapis tokens have a limited lifespan. Long-running notebooks or scripts will hit this after several hours.
165
-
166
92
## Troubleshooting
167
93
168
94
**Invalid credentials:**
@@ -182,16 +108,3 @@ Check your internet connection and DesignSafe service status.
0 commit comments