Skip to content

Trailing periods in base domains #831

Closed

Description

@wgordon17

Version

$ openshift-install version
bin/openshift-install v0.5.0-master-36-gb4f5ceb6bfde8d3dc0e29f708e0494488ea37ee0
Terraform v0.11.10

Platform (aws|libvirt|openstack):

aws

What happened?

Running the provided help script for base domain (aws route53 list-hosted-zones --query 'HostedZones[? !(Config.PrivateZone)].Name' --output text) causes the output of a domain with a trailing period, e.g., example.com.. Copy/pasting this directly into the installer causes the generated kubeconfig to also contain the trailing period...there may also be other areas where this trailing period sticks around. But nothing ended up working, so I just nuked the cluster and rebuilt without the trailing period.

What you expected to happen?

Either automatically strip the trailing period, or provide some validation on the text to ensure only a validly formatted domain name is accepted

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

$ openshift-installer create cluster
? SSH Public Key <none>
? Base Domain example.com.
....

Check kubeconfig

Activity

  1. wking commented on Dec 11, 2018

    @wking
    Member

    My initial thought was to strip the dot, like we used to do in #359. But it turns out that rooted domain names have some nice qualities (e.g. see issues with search and non-rooted domain names discussed in RFC 1535). My guess is that the issue is with X.509 validation for rooted domain names. Checking someone who's probably done things right:

    $ openssl s_client -connect www.google.com.:443 </dev/null
    ...
    Certificate chain
     0 s:/C=US/ST=California/L=Mountain View/O=Google LLC/CN=www.google.com
       i:/C=US/O=Google Trust Services/CN=Google Internet Authority G3
     1 s:/C=US/O=Google Trust Services/CN=Google Internet Authority G3
       i:/OU=GlobalSign Root CA - R2/O=GlobalSign/CN=GlobalSign
    ---
    Server certificate
    -----BEGIN CERTIFICATE-----
    MIIEgjCCA2qgAwIBAgIIRytDotOLd+owDQYJKoZIhvcNAQELBQAwVDELMAkGA1UE
    BhMCVVMxHjAcBgNVBAoTFUdvb2dsZSBUcnVzdCBTZXJ2aWNlczElMCMGA1UEAxMc
    R29vZ2xlIEludGVybmV0IEF1dGhvcml0eSBHMzAeFw0xODExMDcwODU5MDBaFw0x
    OTAxMzAwODU5MDBaMGgxCzAJBgNVBAYTAlVTMRMwEQYDVQQIDApDYWxpZm9ybmlh
    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LO4RoSxbVFp3eQFNVPUxCiWDTLxTQr9MbE8/fzB04ChnBMHn4
    KcoOQTfLA+gisEHJQ+U/Jqit60+brQoiT7Gaw26lTZxY2TsKe9UaIu86lIh1RL1S
    a7emfhuOQGlAyT/oTaUhmoF343UjD/g4+d03BNFzIrp6bHbqY6QkpkWEe5lgReZr
    PNRfKOT3BsYEpLCEfuQnLXAPKV7aFaRW1nvo1aOeYrEO042CNYV8WDXPGIFiO0Su
    cA/7iPSI
    -----END CERTIFICATE-----
    ...

    Dropping that cert into server.crt, we can inspect it with:

    $ openssl x509 -in server.crt -noout -text | grep google
            Subject: C=US, ST=California, L=Mountain View, O=Google LLC, CN=www.google.com
                    DNS:www.google.com

    so the cert only contains non-rooted domains, but my OpenSSL 1.0.2k-fips and Firefox 60.2.0 both handle it fine. Checking with Go:

    $ go version
    go version go1.10.3 linux/amd64
    $ cat test.go
    package main
    
    import (
    	"fmt"
    	"net/http"
    )
    
    func main() {
    	resp, err := http.Get("https://www.google.com./")
    	fmt.Println(resp.Status, err)
    }
    $ go run test.go 
    200 OK <nil>

    So that seems fine too. So as far as I can tell, the trailing period should work, and in some cases (where you want to bypass search) it is preferred. Can you provide more details on "But nothing ended up working", such as error messages you saw?

  2. wgordon17 commented on Dec 17, 2018

    @wgordon17
    ContributorAuthor

    So, a couple of issues,

    1. The server in auth/kubeconfig is listed as https://{CLUSTER_NAME}-api.{BASE_DOMAIN}.:6443. Note the trailing period

    2. The web console doesn't come up

    3. The web console isn't displayed in the CLI output

       INFO Access the OpenShift web-console here:
       INFO Login to the console with user: kubeadmin, password:
      
    4. The API endpoint mentions RBAC issues (no RBAC policy matched)

    I suspect this is all related to the trailing dot, because the exact same scenario without it leads to success every time

  3. wking commented on Dec 17, 2018

    @wking
    Member
    1. The server in auth/kubeconfig is listed as https://{CLUSTER_NAME}-api.{BASE_DOMAIN}.:6443. Note the trailing period

    I don't see why that would be a problem. And as discussed in RFC 1535, it is sometimes a good thing.

    I dunno about the console and RBAC issues, we should definitely track those down.

  4. wgordon17 commented on Dec 17, 2018

    @wgordon17
    ContributorAuthor

    The kubeconfig server entry may just be a symptom not an actual problem.

  5. crawford commented on Jan 4, 2019

    @crawford
    Contributor

    Is this still an issue with the latest installer?

  6. wking commented on Jan 5, 2019

    @wking
    Member

    I still think trailing periods should be supported, but I haven't checked recently to see if they're still broken.

  7. crawford commented on Jan 5, 2019

    @crawford
    Contributor

    I still think trailing periods should be supported

    I agree. I depend on the trailing periods in order to properly do split-horizon.

  8. changed the title [-]No validation on "Base Domain"[/-] [+]Trailing periods in base domains[/+] on Jan 5, 2019
  9. wgordon17 commented on Jan 15, 2019

    @wgordon17
    ContributorAuthor

    Perhaps we would just need to address where the trailing period is necessary versus where including it may break things (like the .kube/config file)

  10. openshift-bot commented on Feb 20, 2020

    @openshift-bot
    Contributor

    Issues go stale after 90d of inactivity.

    Mark the issue as fresh by commenting /remove-lifecycle stale.
    Stale issues rot after an additional 30d of inactivity and eventually close.
    Exclude this issue from closing by commenting /lifecycle frozen.

    If this issue is safe to close now please do so with /close.

    /lifecycle stale

  11. added
    lifecycle/stale
    on Feb 20, 2020
  12. openshift-bot commented on Mar 21, 2020

    @openshift-bot
    Contributor

    Stale issues rot after 30d of inactivity.

    Mark the issue as fresh by commenting /remove-lifecycle rotten.
    Rotten issues close after an additional 30d of inactivity.
    Exclude this issue from closing by commenting /lifecycle frozen.

    If this issue is safe to close now please do so with /close.

    /lifecycle rotten
    /remove-lifecycle stale

  13. added
    lifecycle/rotten
    and removed
    lifecycle/stale
    on Mar 21, 2020
  14. openshift-bot commented on Apr 20, 2020

    @openshift-bot
    Contributor

    Rotten issues close after 30d of inactivity.

    Reopen the issue by commenting /reopen.
    Mark the issue as fresh by commenting /remove-lifecycle rotten.
    Exclude this issue from closing again by commenting /lifecycle frozen.

    /close

  15. openshift-ci-robot commented on Apr 20, 2020

    @openshift-ci-robot
    Contributor

    @openshift-bot: Closing this issue.

    Details

    In response to this:

    Rotten issues close after 30d of inactivity.

    Reopen the issue by commenting /reopen.
    Mark the issue as fresh by commenting /remove-lifecycle rotten.
    Exclude this issue from closing again by commenting /lifecycle frozen.

    /close

    Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    lifecycle/rotten

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions