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

Test/Implement IRSA without kubermatic modifications #16

Open
nce opened this issue Nov 5, 2022 · 2 comments
Open

Test/Implement IRSA without kubermatic modifications #16

nce opened this issue Nov 5, 2022 · 2 comments
Assignees
Labels
invalid This doesn't seem right module new module that needs to be implemented

Comments

@nce
Copy link
Contributor

nce commented Nov 5, 2022

No description provided.

nce added a commit that referenced this issue Nov 7, 2022
@nce
Copy link
Contributor Author

nce commented Nov 7, 2022

Native

Creating a oidc provider in aws is not possible with our kubermatic setup, as the k8s api is not reachable by :443 (but instead on a random hostport).

This renders this approach invalid:

+ resource "aws_iam_openid_connect_provider" "k8s" {
      + arn             = (known after apply)
      + client_id_list  = [
          + "sts.amazonaws.com",
        ]
      + id              = (known after apply)
      + tags_all        = {
          + "Name"    = "ops-k8s-bootstrap"
          + "Owner"   = "ops"
          + "project" = "ops-k8s-bootstrap"
        }
      + thumbprint_list = [
          + "24c8b10aaaeea99aaabcde33b4f80757baad9190",
        ]
      + url             = "https://xmxxxq.adorsys.kaas.cloudpunks.io:3xx4"
    }

https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_oidc.html#manage-oidc-provider-console:

For Provider URL, type the URL of the IdP. The URL must comply with these restrictions:

  • The URL is case-sensitive.
  • The URL must begin with https://.
  • The URL should not contain a port number.

S3 as oidc provider

Another valid approach could be, that we don't rely on the API server to present the .well-known folder, but on a seperate s3 bucket:
image

This reflects the config, initially provided by the API server; Both files - in its current state:

.well-known/openid-configuration
{
  "issuer": "https://kubermatic-staging-irsa.s3.eu-central-1.amazonaws.com",
  "jwks_uri": "https://kubermatic-staging-irsa.s3.eu-central-1.amazonaws.com/keys.json",
  "response_types_supported": [
    "id_token"
  ],
  "subject_types_supported": [
    "public"
  ],
  "id_token_signing_alg_values_supported": [
    "RS256"
  ],
  "claims_supported": [
    "sub",
    "iss"
  ]
}
key.json
{
  "keys": [
    {
      "use": "sig",
      "kty": "RSA",
      "kid": "zfBdILL4MlE-PxAtrRC8RhC3LVCpNkJUQRVEfQPWaTg",
      "alg": "RS256",
      "n": "ucGNVznjPUPTYJalzIijaOnhdOAwF0BrBrSQXEBQs-bctuD7pTn-PT2axNejlydlDaDVmIY3YvBOq2_pITVGG2pCErrX-b7QK-IEBB4Jmz9aR6MgfzfUPbprOez-9iPplhydi9O0zjAZHM1FnbgK4LmSJ8qPKOVI5Qo-unwzfeHr8psp9nXUCgw5V0FvIHq-Jbd6-WBfugcEOIjwXzB9Ta0-P2Bv_zIXa7kUOn6RMP5hoWMC8Q7D0rrYt4CP8PjC-kCcq39ZU-N-JRqGYY5hCrfb7RaqvyErl_XLLGwplqDGVzOh0YHTdOzXdWBxkZEy9U7apz6RwSXQgQqDmKK-PQ",
      "e": "AQAB"
    }
  ]
}

With this setup & the current test.tf (in the irsa module). We get an error in sts get-caller-identity like

theres no valid oidc provider for kass.kubermatic.port

I guess that's because --service-account-issuer is set to the kubermatic url (maybe?)

@nce nce self-assigned this Nov 9, 2022
@tim-tschiersch tim-tschiersch added the module new module that needs to be implemented label Nov 15, 2022
@nce
Copy link
Contributor Author

nce commented Nov 18, 2022

After several tickets we decided to not move forward on this. We'r currently on 2.20 which makes this tricky to configure. Apparently the LB needs to be set on a seed level which we can't risk.

There might be a customer facing webconfiguration option to set this (?) in 2.22.

We now need to remove poilcy/iam/s3

@nce nce added the invalid This doesn't seem right label Nov 18, 2022
nce added a commit that referenced this issue Dec 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right module new module that needs to be implemented
Projects
None yet
Development

No branches or pull requests

2 participants