abidlabs HF Staff commited on
Commit
b78cead
·
verified ·
1 Parent(s): 8a45d5e

Staging: verified Slack identity and read-only sessions (757e55a1)

Browse files
README.md CHANGED
@@ -10,6 +10,7 @@ hf_oauth_scopes:
10
  - inference-api
11
  - read-mcp
12
  - read-billing
 
13
  - jobs
14
  hf_oauth_authorized_org: huggingface
15
  ---
 
10
  - inference-api
11
  - read-mcp
12
  - read-billing
13
+ - contribute-repos
14
  - jobs
15
  hf_oauth_authorized_org: huggingface
16
  ---
docs/source/ml-intern/slack-bot.md CHANGED
@@ -59,7 +59,7 @@ MCP_FORWARD_HF_USER_TOKEN=true
59
 
60
  Use the deployment's actual HTTPS origin for `PUBLIC_ORIGIN`; the configured application base path (for example `/chat`) is appended automatically. HF must be the configured OpenID provider. Configure `SLACK_ML_VIEWER_ORIGIN` to the same origin as `PUBLIC_ORIGIN`, plus `SLACK_ML_VIEWER_CLIENT_ID`, `SLACK_ML_VIEWER_CLIENT_SECRET`, and `SLACK_ML_VIEWER_SESSION_SECRET` as described in the Slack OIDC setup below. Register `/slack/view/callback` (including the application base path) as a redirect URL and enable Sign in with Slack (`openid`). This verifies the Slack identity before linking an HF account. Do not configure a pinned Authorization header on the Hub MCP server: startup rejects that configuration because it would override the user's credentials. The normal startup model-catalog credential is still needed.
61
 
62
- The existing HF OAuth grant must permit the requested work. The normal ML Intern scopes include `openid profile inference-api read-mcp read-billing jobs`; repository operations also depend on the permissions granted to the tools by HF. Configure any additional existing HF scopes required by your deployment and have users sign in again after changing them. This integration does not manufacture permissions or upgrade an existing token's scopes. Validate the production OAuth grant with a small job and repository creation before rollout.
63
 
64
  ### User connection and access
65
 
 
59
 
60
  Use the deployment's actual HTTPS origin for `PUBLIC_ORIGIN`; the configured application base path (for example `/chat`) is appended automatically. HF must be the configured OpenID provider. Configure `SLACK_ML_VIEWER_ORIGIN` to the same origin as `PUBLIC_ORIGIN`, plus `SLACK_ML_VIEWER_CLIENT_ID`, `SLACK_ML_VIEWER_CLIENT_SECRET`, and `SLACK_ML_VIEWER_SESSION_SECRET` as described in the Slack OIDC setup below. Register `/slack/view/callback` (including the application base path) as a redirect URL and enable Sign in with Slack (`openid`). This verifies the Slack identity before linking an HF account. Do not configure a pinned Authorization header on the Hub MCP server: startup rejects that configuration because it would override the user's credentials. The normal startup model-catalog credential is still needed.
61
 
62
+ The HF OAuth grant must permit the requested work. Configure `openid profile inference-api read-mcp read-billing contribute-repos jobs`. The `contribute-repos` scope permits repository creation and access to repositories created by this OAuth app, including model artifacts, datasets, and Spaces; it does not grant general write access to existing repositories. After adding scopes, users must sign in again, approve the updated grant, and reconnect Slack so the bot uses the new session. Existing tokens do not automatically gain permissions. Validate the grant with a small job, repository creation, and artifact upload before rollout.
63
 
64
  ### User connection and access
65
 
integrations/slack/space/README.md CHANGED
@@ -39,12 +39,15 @@ Enable Sign in with Slack with the `openid` scope and register
39
  requires this identity verification before linking HF accounts.
40
 
41
  To use the Space's built-in HF login, add `hf_oauth: true` and
42
- `hf_oauth_scopes: [inference-api, read-mcp, read-billing, jobs]` to its README
43
  metadata. The startup script maps the injected `OAUTH_CLIENT_ID`,
44
  `OAUTH_CLIENT_SECRET`, and `OAUTH_SCOPES` to Chat UI's `OPENID_*` settings unless
45
  an explicit `OPENID_CLIENT_ID` is already configured. Set `PUBLIC_ORIGIN` to the
46
  Space's HTTPS app origin. Login and compute consent still require the user's
47
- approval. Test conversations appear in this Space's chat history, not hf.co/chat.
 
 
 
48
 
49
  Keep the Space private for an owner-only test; other testers will need access
50
  to the deployment. Seed a fresh empty state bucket rather than copying production
 
39
  requires this identity verification before linking HF accounts.
40
 
41
  To use the Space's built-in HF login, add `hf_oauth: true` and
42
+ `hf_oauth_scopes: [inference-api, read-mcp, read-billing, contribute-repos, jobs]` to its README
43
  metadata. The startup script maps the injected `OAUTH_CLIENT_ID`,
44
  `OAUTH_CLIENT_SECRET`, and `OAUTH_SCOPES` to Chat UI's `OPENID_*` settings unless
45
  an explicit `OPENID_CLIENT_ID` is already configured. Set `PUBLIC_ORIGIN` to the
46
  Space's HTTPS app origin. Login and compute consent still require the user's
47
+ approval. `contribute-repos` permits repository creation and access to repositories
48
+ created by this OAuth app, including model artifacts and Spaces. After adding a
49
+ scope, users must sign in again, approve the updated grant, and reconnect Slack;
50
+ existing tokens do not automatically gain permissions. Test conversations appear in this Space's chat history, not hf.co/chat.
51
 
52
  Keep the Space private for an owner-only test; other testers will need access
53
  to the deployment. Seed a fresh empty state bucket rather than copying production