Skip to content

Service Tokens#911

Draft
davlgd wants to merge 3 commits intomainfrom
davlgd-service-tokens
Draft

Service Tokens#911
davlgd wants to merge 3 commits intomainfrom
davlgd-service-tokens

Conversation

@davlgd
Copy link
Copy Markdown
Collaborator

@davlgd davlgd commented Apr 3, 2026

📝 What does this PR do?

This PR updates documentation to mention service tokens


🧪 Type of Change

  • ⚠️ Bug fix
  • 📅 Changelog update
  • 📚 Documentation update
  • ✨ New content/feature
  • 🔧 Technical/maintenance

✅ Quick Checklist


👥 Reviewers

@hsablonniere
@judu

@davlgd davlgd requested review from Copilot, hsablonniere and judu April 3, 2026 09:43
@davlgd davlgd self-assigned this Apr 3, 2026
@davlgd davlgd marked this pull request as draft April 3, 2026 09:43
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 3, 2026

✅ Review app deployed

Check how your changes look like!

ℹ️ Name 🔗 Infos & links
🌱 Latest deployed commit 904b96b
👁️ Preview https://documentation-PR-911.cleverapps.io/developers

@davlgd davlgd changed the title Davlgd service tokens Service Tokens Apr 3, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the documentation to introduce and describe service tokens as an additional authentication mechanism, including their role-based permissions and usage from both Clever Tools and the API.

Changes:

  • Add “service tokens” to keywords and organisation roles/privileges documentation.
  • Extend the API overview to document service tokens, including a comparison table vs API tokens and OAuth 1.
  • Add a detailed “Service tokens” section covering creation, usage, and Biscuit inspection/attenuation.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.

File Description
content/doc/account/organisations.md Adds service tokens to keywords and the roles/privileges table, plus a note about role assignment limits when creating tokens.
content/api/howto.md Adds service tokens as a third authentication mechanism, documents how to create/use them, and includes a feature comparison table.

Comment on lines +39 to +43
| **Max lifetime** | 1 year | 3 months | 1 year (default: 90 days) |
| **Role-based** | No | No (permission-based) | Yes (Admin, Manager, Developer, Accounting) |
| **API endpoint** | API Bridge only | Main API (v2, v4) | Main API (v2) |
| **Best for** | Personal scripts, CLI | Third-party apps | CI/CD, automation, M2M |

Copy link

Copilot AI Apr 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The OAuth 1 max lifetime is stated as "3 months", but the existing documentation states OAuth tokens last 1 year when created via Clever Tools and 3 months via Console/other integrations. Consider updating this row (or adding a footnote) to reflect that lifetime depends on how the OAuth token is created, to avoid contradicting the changelog entry.

Suggested change
| **Max lifetime** | 1 year | 3 months | 1 year (default: 90 days) |
| **Role-based** | No | No (permission-based) | Yes (Admin, Manager, Developer, Accounting) |
| **API endpoint** | API Bridge only | Main API (v2, v4) | Main API (v2) |
| **Best for** | Personal scripts, CLI | Third-party apps | CI/CD, automation, M2M |
| **Max lifetime** | 1 year | Depends on how you create it* | 1 year (default: 90 days) |
| **Role-based** | No | No (permission-based) | Yes (Admin, Manager, Developer, Accounting) |
| **API endpoint** | API Bridge only | Main API (v2, v4) | Main API (v2) |
| **Best for** | Personal scripts, CLI | Third-party apps | CI/CD, automation, M2M |
\* OAuth 1 tokens last up to 1 year when you create them with Clever Tools, and up to 3 months when you create them from the Console or other integrations.

Copilot uses AI. Check for mistakes.
@judu
Copy link
Copy Markdown
Member

judu commented Apr 3, 2026

Peut être un lien un peu plus direct vers un « comment installer la cli biscuit » ?

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@davlgd davlgd deployed to update doc April 3, 2026 10:24 — with GitHub Actions Active
@judu
Copy link
Copy Markdown
Member

judu commented Apr 3, 2026

Pour git push, un truc qui fonctionne à 100% :

; cat > /tmp/askpass.sh <<EOF
echo "<the biscuit>"
EOF

; chmod +x /tmp/askpass.sh
; git remote add deploy-cc https://push-par-….services.clever-cloud.com/app_babe00000….git # NOTE THE https url
; GIT_ASKPASS=/tmp/askpass.sh git push deploy-cc HEAD:master

J’ai pas complètement testé ça mais :

git remote add deploy-cc https://<biscuit>:unused@push-par-….services.clever-cloud.com/app_babe0000….git

git push deploy-cc HEAD:master

Ça devrait marcher.

note : c’est la même basic auth que le git push https qu’on fait déjà avec les tokens oauth. Le twist c’est qu’il faut mettre le biscuit en username de l’auth !

La méthode git askpass fait que le script est appelé deux fois je crois et on envoie le push avec Authorization: Basic base64(<biscuit>:<biscuit>) et le "password" est ignoré côté serveur.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants