Skip to content
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

Add AdminClient for adminv1gprc #21

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lammel
Copy link

@lammel lammel commented Aug 14, 2024

When trying to use gpcore to access GPortal GameServer functions I found the required AdminClient to be missing.

This PR adds the AdminClient to the current client implementation.
The missing bump for the latest protobuf is also included.

@lammel lammel force-pushed the feature/add-adminclient-for-adminv1gprc branch from dd9e87d to 7bc82aa Compare August 14, 2024 09:09
Copy link
Member

@BirknerAlex BirknerAlex left a comment

Choose a reason for hiding this comment

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

LGTM

@BirknerAlex
Copy link
Member

Hey,

GPCORE is our B2B hosting platform and has nothing todo with the GPORTAL game server B2C brand. You won't be able to perform any actions against your GPORTAL game server via GPCORE.

At the moment we do not provide any public APIs for the game server backend, you could see what the browser does in the customer panel and "reverse engineer" the requests. But there is also no guarantee APIs will not change from time to time.

But regarding the MR it LGTM, thank you!

@lammel
Copy link
Author

lammel commented Aug 14, 2024

GPCORE is our B2B hosting platform and has nothing todo with the GPORTAL game server B2C brand. You won't be able to perform any actions against your GPORTAL game server via GPCORE.

At the moment we do not provide any public APIs for the game server backend, you could see what the browser does in the customer panel and "reverse engineer" the requests. But there is also no guarantee APIs will not change from time to time.

Well I came across that topic from reverse engineering what the Browser, stumbled upon gpcore.io and the github projects.
Guess the B2C GPortal GameServers are run on your GPCore hosting plattform reusing the same keycloak servers for authentication, so I had some hopes, that this could work out :)

2024/08/14 13:48:53 failed to fetch servers: 
rpc error: code = Unauthenticated desc = You do not have the required roles []keycloak.Role{"view-server", "super-admin"} to
access this resource.

It seems that not too much is missing apart from being able to assign privileges for the OAuth Clients.

Do you see a chance to trigger a restart of a server using this API in the current state or are there any plans to work on that?

@BirknerAlex
Copy link
Member

It is indeed the same Keycloak cluster and theoretically you can use GPCORE Client Auth to talk with the game server backend but I never tested this.

But: The Admin API of GPCORE is internal only, that is the reason why you get this error message and also the reason why it is not added to our public library yet.

But theoretically you could use the NGP GraphQL API under https://www.g-portal.com/ngpapi/ to restart your game server if using the same request payload as the customer panel.

@lammel
Copy link
Author

lammel commented Aug 15, 2024

It is indeed the same Keycloak cluster and theoretically you can use GPCORE Client Auth to talk with the game server backend but I never tested this.

Ok, thanks for the hint. I will test this.

But: The Admin API of GPCORE is internal only, that is the reason why you get this error message and also the reason why it is not added to our public library yet.

Understood and looking forward, that this might be added to the public API one day.

But theoretically you could use the NGP GraphQL API under https://www.g-portal.com/ngpapi/ to restart your game server if using the same request payload as the customer panel.

Herzlichen Dank, will try it that way and fall back to use the current request used by the web frontend.

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.

2 participants