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

[Agones] Removing/updating token annotation on a GameServer deoesn't update the Endpoint #589

Closed
Tracked by #546
markmandel opened this issue Sep 10, 2022 · 2 comments · Fixed by #631
Closed
Tracked by #546
Labels
area/user-experience Pertaining to developers trying to use Quilkin, e.g. cli interface, configuration, etc kind/bug Something isn't working

Comments

@markmandel
Copy link
Contributor

What happened:

I have a Quilkin Agones xDS server, and connected Quilkin proxies.

  1. I created and allocated GameServer in Agones with the quilkin.dev/tokens: annotation.
  2. I then kubectl edit that GameServer and removed the quilkin.dev/tokens: annotation.
  3. I see two endpoints now in the config for my proxy, not a single one with the token removed.
➜  agones-xonotic-xds git:(examples/xonotic-xds) ✗ curl -s http://localhost:9091/config | jq
{
  "admin": {
    "address": "0.0.0.0:9091"
  },
  "clusters": {
    "default": {
      "localities": [
        {
          "locality": null,
          "endpoints": []
        },
        {
          "locality": null,
          "endpoints": [
            {
              "address": "34.127.72.131:7251",
              "metadata": {
                "quilkin.dev": {
                  "tokens": [
                    "NDU2"
                  ]
                }
              }
            }
          ]
        },
        {
          "locality": null,
          "endpoints": [
            {
              "address": "34.127.72.131:7251",
              "metadata": {
                "quilkin.dev": {
                  "tokens": []
                }
              }
            }
          ]
        }
      ]
    }
  },
  "filters": [
    {
      "name": "quilkin.filters.capture.v1alpha1.Capture",
      "config": {
        "metadataKey": "quilkin.dev/capture",
        "suffix": {
          "size": 3,
          "remove": true
        }
      }
    },
    {
      "name": "quilkin.filters.token_router.v1alpha1.TokenRouter",
      "config": null
    }
  ],
  "management_servers": [
    {
      "address": "http://quilkin-manage-agones:80"
    }
  ],
  "proxy": null,
  "version": "v1alpha1"
}

What you expected to happen:

The token removed from the endpoint, so an end user could remove a playing user based on their connection token in realtime.

How to reproduce it (as minimally and precisely as possible):

See above.

Anything else we need to know?:

Not sure if duplicated to #585 so reporting separately.

Environment:

  • Quilkin version: dev.
  • Execution environment (binary, container, etc): Container
  • Operating system: Linux
  • Custom filters? (Yes/No - if so, what do they do?): No
  • Log(s): N/A
  • Others: N/A
@markmandel markmandel added kind/bug Something isn't working area/user-experience Pertaining to developers trying to use Quilkin, e.g. cli interface, configuration, etc labels Sep 10, 2022
@markmandel
Copy link
Contributor Author

Just did a check on the admin server as well, and see the same config

{
  "admin": {
    "address": "0.0.0.0:9091"
  },
  "clusters": {
    "default": {
      "localities": [
        {
          "locality": null,
          "endpoints": []
        },
        {
          "locality": null,
          "endpoints": [
            {
              "address": "34.127.72.131:7251",
              "metadata": {
                "quilkin.dev": {
                  "tokens": [
                    "NDU2"
                  ]
                }
              }
            }
          ]
        },
        {
          "locality": null,
          "endpoints": [
            {
              "address": "34.127.72.131:7251",
              "metadata": {
                "quilkin.dev": {
                  "tokens": []
                }
              }
            }
          ]
        }
      ]
    }
  },
  "filters": [
    {
      "name": "quilkin.filters.capture.v1alpha1.Capture",
      "config": {
        "metadataKey": "quilkin.dev/capture",
        "suffix": {
          "size": 3,
          "remove": true
        }
      }
    },
    {
      "name": "quilkin.filters.token_router.v1alpha1.TokenRouter",
      "config": null
    }
  ],
  "management_servers": null,
  "proxy": null,
  "version": "v1alpha1"
}

@markmandel
Copy link
Contributor Author

Just did a local manual test - can confirm the token gets dropped.

Will write an extra piece to the Agones integration tests to automate testing of this, and we can close this issue.

markmandel added a commit to markmandel/quilkin that referenced this issue Oct 25, 2022
Added to existing integration test that when a token annotation is
removed from a `GameServer` record, it is also removed from the Quilkin
endpoint configuration - thereby blocking access to the GameServer.

Closes googleforgames#589
markmandel added a commit that referenced this issue Oct 25, 2022
Added to existing integration test that when a token annotation is
removed from a `GameServer` record, it is also removed from the Quilkin
endpoint configuration - thereby blocking access to the GameServer.

Closes #589

Co-authored-by: XAMPPRocky <4464295+XAMPPRocky@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/user-experience Pertaining to developers trying to use Quilkin, e.g. cli interface, configuration, etc kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant