Register web client to access the vault - #333
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe Hydra configuration adds the public OAuth client “Web vault by Jip Wijnia.” It specifies grants, scopes, a redirect URI, client metadata, and no token endpoint authentication. ChangesOAuth client configuration
Priority: ➖ Normal Estimated code review effort: 1 (Trivial) | ~4 minutes Change: Feature Suggested reviewers: Merge Risk: ⚪ Minimal · up to No concrete merge-blocking issue is established in the current client registration; its redirect points to the HTTPS vault endpoint. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The new client has limited scopes and a single HTTPS callback, without administrative or content-writing permissions. However, removing its configuration does not automatically revoke its registration, and the external application's callback and token protections remain unverified. Retained concerns
Security review detailsSecurity Blast Radius
Security Findings and Attack Paths
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| id: "54576b8e-14bc-473d-9f85-31e6327c9e3b" | ||
| grantType: "authorization_code,refresh_token" | ||
| scope: "openid,offline,public_profile" | ||
| redirectUri: "https://vault.jipwijnia.nl/,http://127.0.0.1" |
There was a problem hiding this comment.
If I understood correct, this enables me to test locally while developing. I can also keep re-using the faf client id for this.
There was a problem hiding this comment.
Do you want test against prod or test? Or local girops stack
There was a problem hiding this comment.
I test against prod at the moment, I just login and use the search page to find a replay
| redirectUri: "https://vault.jipwijnia.nl/" | ||
| logoUri: "https://vault.jipwijnia.nl/favicon.png" | ||
| clientUri: "https://github.com/Garanas/scfa-cs-replay" | ||
| tokenEndpointAuthMethod: "none" |
There was a problem hiding this comment.
Why is the auth none? This is a website right so you should have a client secret post. Or is this a purely client side web app.
There was a problem hiding this comment.
At the moment it is essentially a static website with a very small backend. The backend exists at this stage to circumvent problems with CORS on the /api/oauth/token endpoint and to populate discord, twitter or slack cards with content.
edit: but I could totally miss interpret it. I'm not that familiar with CORS, I just know it exists for good reasons 😃
There was a problem hiding this comment.
Does your app use pkce? If not it would be better to use client secret post auth.
There was a problem hiding this comment.
Yes, see also:
- https://github.com/Garanas/scfa-cs-replay/blob/main/src/FAForever.Vault.Viewer/Services/Auth/AuthService.cs#L61-L90
- https://github.com/Garanas/scfa-cs-replay/blob/main/src/FAForever.Vault.Viewer/Services/Auth/AuthService.cs#L122-L173
Ideally the tokens would not need to pass through the server. Is there anything I can do to make that part of the website entirely static?
There was a problem hiding this comment.
Oh interesting, what issues do you have with CORS?
There was a problem hiding this comment.
I would have thought if it was pure SPA then should be fine all client side.
* Register client for the vault * Remove the localhost redirect
Open to suggestions on the name. It would be interesting for this to become more official when it's more matured. But for now it's not matured sufficiently for that yet.
I've been building some tooling in 2024-2025 to parse the various binary files of Supreme Commander: Forged Alliance Forever. Building the interface was a bottleneck back then, but now with the recent versions of Claude it no longer is. I made an web interface to parse replays and analyse them.
replay-viewer-02.mp4
Eventually I want this to do more than just replays. Being able to access and analyse content like maps and mods would be up next. I already wrote a scenario file parser a while back, I just need to add the web interface for it.
I want to use the login to directly access the vault, to be able to search for content just like you would in the client.
Some features in this web interface are requested by the moderator team for a while now, such as being able to show players why they are banned by sharing the replay with them. They can then upload it and see the data for themselves. Ideally you can still access this service when banned, but that is likely much more work and out of scope for now.
Summary by CodeRabbit