-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implements admin/avatar/maps/profile/session/shards/registration apis and small fixes #106
Conversation
8007889
to
e3d01b5
Compare
Updated with new endpoints |
9752ba1
to
fe7072f
Compare
Updated with Server can receive uploads and host shards now |
All test files are empty dummy files generated with We can replace them after we decide what test scenes to use. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's merge in a few days.
My argument for making the test files real is we should not allow fake files in theory. Yes thats hard but we should at least block mime types that don’t match and zero files |
I agree, an extension whitelist is not enough uro/lib/uro/uploaders/user_content_data.ex Lines 4 to 9 in 9d09c44
I think we should handle this in a new issue though. By the way, if we make test files real we will have a binary .scn in repository, is it ok? @lyuma |
@dragonhunt02 If the binary .scn is for a test scene with a plane and default cube, it should be a few kilobytes which is fine. Same thing for .glb and .vrm File type Checks could make it harder to add more formats or encrypted formats, so I am worried it will make that more difficult in the future, but for now glb header (.glb and .vrm) and RSRC header (.scn) is all I upload |
.glb and .vrm are blocked right now. Indeed the test scene needs to be a minimal working scene. 👍
I don't think it will be a problem, we can filter allowed extensions like what we are doing now and then run optional tests to ensure extension matches binaries. |
My code in xr_avatar supports glb. This sort of debate is why I'd prefer not to enforce a whitelist for now, but if we do go for a whitelist, I want at least one standardized 3d format such as glb. |
Well, whitelist on uploads was already enforced before my PR. So, I will add .glb to allowed extensions (next PR?) @fire Could you handle generating the test avatars/scenes/images? |
Sure. I'll grab the vrm1, a standard glb and a binary godot engine scene. |
I am not okay with anything above a few kilobytes at this stage. if we really want to write a validator on the server, that should be a separate PR and we need to consider security implications. For now I assume that all this should be doing is checking the magic bytes in the file header |
We'll need to convert https://github.com/KhronosGroup/glTF-Sample-Assets/blob/main/Models/SimpleSkin/glTF-Embedded/SimpleSkin.gltf to glb/scn but it is 3.48 KB. |
17eca3f
to
3671659
Compare
@fire Lyuma suggested opening another PR for |
Thanks! I am a bit busy this week so I'd like a small tutorial how to run uro. |
Instructions are in README.md I don't have a script ready to quickly install Caddy SSL certificates though. Game will fail TLS handshake if they're not correctly installed. |
I can proxy uro through tailscale that has a proper CA certificate and is globally accessible. |
Well, you can replace You can send me a message if you find issues setting it up. |
#103
Additions
/uploads
with Waffle and Caddyfileauthenticated_user
to access certain endpoints. Since game client and website share some endpoints, aChooseAuth
plug was added to fallback toCookie
authentication ifAuthorization
header is missing./dashboard
endpoints/admin
api endpoint and control panel page stub/profile
/session
/registration
game client endpoints/session/renew
dummy endpoint to refresh access tokens for game client compatibility/shards
endpoints implementationSIGNUP_API_KEY
key to authenticate game client signup requestspriv/repo/test_user_content.exs
to populate database with test user contentFixes
cache_static_manifest
(no file is served frompriv/static
)lib/uro/controllers/identity_proof_controller.ex
is_session_admin?/1
Uro.Plug.Authentication
authentication. ClientAuthorization
token was not recognized because it was sent withoutBearer
prefixpriv/repo/test_seeds.exs
not confirming email of generated usersEndpoints were tested with
curl
, further testing is neededMissing features: