Skip to content

Commit 5317127

Browse files
authored
Merge pull request #136 from mariodruiz/github-app-updates
GitHub app updates
2 parents fbcde22 + 82a812a commit 5317127

10 files changed

Lines changed: 25 additions & 26 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ Kubernetes provides a robust infrastructure for deploying and managing JupyterHu
158158

159159
Seamless integration with GitHub Single Sign-On (SSO) and Native Authenticator for secure and efficient user authentication.
160160
- **Auto-admin on install**: Initial admin created automatically with random password
161-
- **Dual login**: GitHub OAuth + Native accounts on single login page
161+
- **Dual login**: GitHub App + Native accounts on single login page
162162
- **Batch user management**: CSV/Excel-based bulk operations via scripts
163163

164164
### Storage Management and Security
@@ -198,7 +198,7 @@ Full documentation is available at: **https://amdresearch.github.io/aup-learning
198198

199199
- [Deployment Guide](deploy/README.md) - Single-node and multi-node deployment
200200
- [Configuration Reference](https://amdresearch.github.io/aup-learning-cloud/jupyterhub/configuration-reference.html) - `runtime/values.yaml` field reference
201-
- [Authentication Guide](https://amdresearch.github.io/aup-learning-cloud/jupyterhub/authentication-guide.html) - GitHub OAuth and native authentication
201+
- [Authentication Guide](https://amdresearch.github.io/aup-learning-cloud/jupyterhub/authentication-guide.html) - GitHub App and native authentication
202202
- [User Management Guide](https://amdresearch.github.io/aup-learning-cloud/jupyterhub/user-management.html) - Batch user operations with scripts
203203
- [User Quota System](https://amdresearch.github.io/aup-learning-cloud/jupyterhub/quota-system.html) - Resource usage tracking and quota management
204204

runtime/chart/values.schema.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3179,8 +3179,8 @@ properties:
31793179
31803180
- `auto-login`: No credentials required, auto-login as 'student' (for demos/single-node)
31813181
- `dummy`: Accept any username/password (for testing)
3182-
- `github`: GitHub OAuth authentication only
3183-
- `multi`: GitHub OAuth + Local native accounts (recommended for production)
3182+
- `github`: GitHub App authentication only
3183+
- `multi`: GitHub App + Local native accounts (recommended for production)
31843184
31853185
adminUser:
31863186
type: object

runtime/chart/values.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1919
# SOFTWARE.
2020

21-
2221
# fullnameOverride and nameOverride distinguishes blank strings, null values,
2322
# and non-blank strings. For more details, see the configuration reference.
2423
fullnameOverride: ""
@@ -35,8 +34,8 @@ custom:
3534
# Authentication mode: "auto-login" | "dummy" | "github" | "multi"
3635
# - auto-login: No credentials required, auto-login as 'student' (default, for single-node)
3736
# - dummy: Accept any username/password (for testing)
38-
# - github: GitHub OAuth authentication
39-
# - multi: GitHub OAuth + Local accounts
37+
# - github: GitHub App authentication
38+
# - multi: GitHub App + Local accounts
4039
authMode: "auto-login"
4140

4241
# Auto-create admin user on first install (optional)

runtime/hub/core/authenticators/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
from core.authenticators.auto_login import AutoLoginAuthenticator
2727
from core.authenticators.firstuse import CustomFirstUseAuthenticator
28-
from core.authenticators.github_oauth import CustomGitHubOAuthenticator
28+
from core.authenticators.github_app import CustomGitHubOAuthenticator
2929
from core.authenticators.jwt import RemoteLabAuthenticator
3030
from core.authenticators.multi import CustomMultiAuthenticator
3131

runtime/hub/core/authenticators/github_oauth.py renamed to runtime/hub/core/authenticators/github_app.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
# SOFTWARE.
1919

2020
"""
21-
GitHub OAuth Authenticator
21+
GitHub App Authenticator
2222
23-
Custom GitHub OAuth authenticator with team integration support.
23+
Custom GitHub App authenticator with team integration support.
2424
Supports automatic token refresh for GitHub App user-to-server tokens.
2525
"""
2626

@@ -54,7 +54,7 @@ async def get(self):
5454

5555

5656
class CustomGitHubOAuthenticator(GitHubOAuthenticator):
57-
"""GitHub OAuth authenticator with access token preservation and refresh."""
57+
"""GitHub App authenticator with access token preservation and refresh."""
5858

5959
name = "github"
6060
callback_handler = _GitHubAppInstallCallbackHandler

runtime/hub/frontend/apps/admin/src/components/EditUserModal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ export function EditUserModal({ show, user, onHide, onUpdate }: Props) {
139139
</InputGroup>
140140
<Form.Text className="text-muted">
141141
{isGitHubUser
142-
? 'GitHub OAuth usernames cannot be renamed'
142+
? 'GitHub App usernames cannot be renamed'
143143
: 'Only letters, numbers, hyphens, and underscores allowed'}
144144
</Form.Text>
145145
</Form.Group>

runtime/hub/frontend/apps/spawn/src/components/CourseCard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ export const CourseCard = memo(function CourseCard({
205205
<small className="repo-url-error">{repoUrlError}</small>
206206
)}
207207

208-
{/* GitHub App Install/Manage Prompt (only for GitHub OAuth users) */}
208+
{/* GitHub App Install/Manage Prompt (only for GitHub App users) */}
209209
{githubAppName && isCurrentUserGitHub() && (
210210
<a
211211
className="github-app-prompt"

runtime/hub/frontend/templates/login.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,9 @@ <h1 class="text-2xl font-bold text-gray-800">Login to AUP Learning Cloud</h1>
160160
</form>
161161

162162
{% elif authenticator_mode == 'github' %}
163-
<!-- GitHub OAuth Only -->
164-
<!-- NOTE: Do NOT add "| urlencode" to OAuth links! JupyterHub already URL-escapes
165-
the "next" variable. OAuth stores next in a cookie as-is, so double-encoding
163+
<!-- GitHub App Only -->
164+
<!-- NOTE: Do NOT add "| urlencode" to App links! JupyterHub already URL-escapes
165+
the "next" variable. App stores next in a cookie as-is, so double-encoding
166166
causes redirects to fail (e.g., /hub/%2Fhub%2F instead of /hub/).
167167
Form POST actions DO need urlencode due to different browser/server handling. -->
168168
<div class="mb-6">
@@ -176,8 +176,8 @@ <h1 class="text-2xl font-bold text-gray-800">Login to AUP Learning Cloud</h1>
176176
</div>
177177

178178
{% else %}
179-
<!-- Multi Authenticator: GitHub OAuth + Native accounts -->
180-
<!-- GitHub OAuth Button -->
179+
<!-- Multi Authenticator: GitHub App + Native accounts -->
180+
<!-- GitHub App Button -->
181181
<!-- NOTE: Do NOT add "| urlencode" here - see comment above for explanation -->
182182
<div class="mb-6">
183183
<a href="{{ base_url }}github/oauth_login?next={{ next }}"

runtime/values-multi-nodes.yaml.example

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ custom:
5353
# Authentication mode
5454
# - auto-login: No credentials required, auto-login as 'student' (for single-node dev)
5555
# - dummy: Accept any username/password (for testing)
56-
# - github: GitHub OAuth authentication
57-
# - multi: GitHub OAuth + native first-use accounts
56+
# - github: GitHub App authentication
57+
# - multi: GitHub App + native first-use accounts
5858
authMode: "multi"
5959

6060
# GitHub organization name for team-based resource access
@@ -94,7 +94,7 @@ custom:
9494
# Private repo access — two independent mechanisms (can be used together):
9595
#
9696
# 1. GitHub App (githubAppName)
97-
# For GitHub OAuth users. Users authorize per-repo read-only access via
97+
# For GitHub App users. Users authorize per-repo read-only access via
9898
# the GitHub App UI. Token is obtained automatically from OAuth session.
9999
# Requires migrating from OAuth App to GitHub App — see below.
100100
#

runtime/values.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ custom:
4646
# Authentication mode
4747
# - auto-login: No credentials required, auto-login as 'student' (for single-node dev)
4848
# - dummy: Accept any username/password (for testing)
49-
# - github: GitHub OAuth authentication
50-
# - multi: GitHub OAuth + Local accounts
49+
# - github: GitHub App authentication
50+
# - multi: GitHub App + Local accounts
5151
authMode: "auto-login"
5252

5353
# Auto-create admin user on first install
@@ -136,7 +136,7 @@ custom:
136136
# Private repo access — two independent mechanisms (can be used together):
137137
#
138138
# 1. GitHub App (githubAppName)
139-
# For GitHub OAuth users. Users authorize per-repo read-only access via
139+
# For GitHub App users. Users authorize per-repo read-only access via
140140
# the GitHub App UI. Token is obtained automatically from OAuth session.
141141
# Requires migrating from OAuth App to GitHub App — see below.
142142
#
@@ -167,7 +167,7 @@ custom:
167167
# -- Private Repo Access --
168168
# GitHub App slug (e.g. "aup-learning-cloud")
169169
# Enables repo picker UI and automatic OAuth token usage for private repos.
170-
# Only effective for GitHub OAuth users; auto-login/native users are unaffected.
170+
# Only effective for GitHub App users; auto-login/native users are unaffected.
171171
githubAppName: ""
172172
# Default access token for private repos (e.g. a bot/service account PAT).
173173
# Works for ALL auth modes including auto-login — users don't need to know
@@ -463,7 +463,7 @@ hub:
463463
Authenticator:
464464
allow_all: true
465465

466-
# ---- GitHub OAuth ----
466+
# ---- GitHub App ----
467467
GitHubOAuthenticator:
468468
oauth_callback_url: "https://<Your.domain>/hub/github/oauth_callback"
469469
app_id: ""

0 commit comments

Comments
 (0)