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

asset/installconfig: improve validation of user inputs #711

Merged
merged 15 commits into from
Dec 15, 2018
Merged

asset/installconfig: improve validation of user inputs #711

merged 15 commits into from
Dec 15, 2018

Commits on Dec 15, 2018

  1. validate: improve base domain validation

    Use kubernetes validation of rfc-1123 sub-domains, with the
    addition that the base domain can end with a dot. This change removes the
    ability to use uppercase letters in the base domain.
    
    https://jira.coreos.com/browse/CORS-850
    staebler committed Dec 15, 2018
    Configuration menu
    Copy the full SHA
    3badd35 View commit details
    Browse the repository at this point in the history
  2. validate: improve cluster name validation

    Use kubernetes validation of rfc-1123 sub-domains. This change
    removes the restriction that each label in the cluster name is at most 63
    characters long.
    
    https://jira.coreos.com/browse/CORS-850
    staebler committed Dec 15, 2018
    Configuration menu
    Copy the full SHA
    c001cbd View commit details
    Browse the repository at this point in the history
  3. validate: improve image pull secret validation

    Validate that (1) there is an "auths" field, (2) the "auths"
    value has fields, and (3) each field in the "auth" value has
    an "auth" or a "credsStore" field.
    
    https://jira.coreos.com/browse/CORS-850
    staebler committed Dec 15, 2018
    Configuration menu
    Copy the full SHA
    1df7704 View commit details
    Browse the repository at this point in the history
  4. validate: improve ssh public key validation

    Use ParseAuthorizedKey from golang.org/x/crypto/ssh to validate that
    the provided ssh key can be parsed.
    
    https://jira.coreos.com/browse/CORS-850
    staebler committed Dec 15, 2018
    Configuration menu
    Copy the full SHA
    d2c528f View commit details
    Browse the repository at this point in the history
  5. vendor: golang.org/x/crypto ssh sub-package

    The validation functions use golang.org/x/crypto/ssh to validate the ssh
    key provided.
    
    https://jira.coreos.com/browse/CORS-850
    staebler committed Dec 15, 2018
    Configuration menu
    Copy the full SHA
    ef9282d View commit details
    Browse the repository at this point in the history
  6. asset/installconfig: move uri validation to validation package

    Move the uri validation from pkg/asset/installconfig/libvirt to pkg/validation
    for consistency with other validation functions.
    
    https://jira.coreos.com/browse/CORS-850
    staebler committed Dec 15, 2018
    Configuration menu
    Copy the full SHA
    d813360 View commit details
    Browse the repository at this point in the history
  7. validate: simplify CIDR validation

    Much of the code that made of the CIDR validation was there to give a custom
    description of what made the CIDR provided invalid. This has been removed in
    favor of using the error returned by the golang library's ParseCIDR function.
    
    Additionally, the code to determine whether two CIDRs overlap was unnecessary
    complex because it did not take advantage of the fact that CIDRs only overlap
    if one is a subset of the other.
    
    https://jira.coreos.com/browse/CORS-850
    staebler committed Dec 15, 2018
    Configuration menu
    Copy the full SHA
    b2d6fa4 View commit details
    Browse the repository at this point in the history
  8. asset/installconfig: validate InstallConfig loaded from file

    When an InstallConfig asset is loaded from an on-disk file, validate that
    the fields of the InstallConfig have appropriate values. This uses all the
    same validations that are down on the user-provided assets upon which the
    InstalConfig asset depends as well as addition validations on other fields.
    
    #711
    staebler committed Dec 15, 2018
    Configuration menu
    Copy the full SHA
    e2d281a View commit details
    Browse the repository at this point in the history
  9. asset/installconfig: remove emailaddress asset

    The emailaddress asset is no longer used as of commit e7aaedb.
    staebler committed Dec 15, 2018
    Configuration menu
    Copy the full SHA
    4ccebbf View commit details
    Browse the repository at this point in the history
  10. validate: remove unused functions

    Remove validation functions that are no longer being used.
    
    https://jira.coreos.com/browse/CORS-850
    staebler committed Dec 15, 2018
    Configuration menu
    Copy the full SHA
    c793af1 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    da09a30 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    cfc5eac View commit details
    Browse the repository at this point in the history
  13. vendor: add github.com/golang/mock/gomock

    Add gomock to use to mock asset.FileFetcher in unit tests that load assets.
    
    https://jira.coreos.com/browse/CORS-850
    staebler committed Dec 15, 2018
    Configuration menu
    Copy the full SHA
    e5bb73e View commit details
    Browse the repository at this point in the history
  14. asset/installconfig: validate openstack platform values in install-co…

    …nfig.yml
    
    Move the fetching of openstack platform values to types/openstack/validation
    so that it can be used to validate values in the install-config.yml as well.
    
    https://jira.coreos.com/browse/CORS-888
    staebler committed Dec 15, 2018
    Configuration menu
    Copy the full SHA
    0ce4e26 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    355cad8 View commit details
    Browse the repository at this point in the history