Merge branch '16312-s3-signature-v4'
authorTom Clegg <tom@tomclegg.ca>
Wed, 20 May 2020 14:14:41 +0000 (10:14 -0400)
committerTom Clegg <tom@tomclegg.ca>
Wed, 20 May 2020 14:14:41 +0000 (10:14 -0400)
closes #16312

Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom@tomclegg.ca>

1  2 
doc/admin/upgrading.html.textile.liquid
lib/config/config.default.yml
lib/config/generated_config.go
sdk/go/arvados/config.go

index 070e58983a50fc01c8943d6d29aa46b3d0453361,dff4fc7e34c7c7c51055db42dc98dbced6ee62df..edd92fa0ea1a117a91d60f3453dc6c3bd146ca3d
@@@ -38,12 -38,12 +38,16 @@@ h2(#master). development master (as of 
  
  "Upgrading from 2.0.0":#v2_0_0
  
 -None in current development master.
 +h3. Removing sso-provider
 +
 +The SSO (single sign-on) component is deprecated and will not be supported in future releases. Existing configurations will continue to work in this release, but you should switch to one of the built-in authentication mechanisms as soon as possible. See "setting up web based login":{{site.baseurl}}/install/setup-login.html for details.
 +
 +After migrating your configuration, uninstall the @arvados-sso-provider@ package.
  
+ h3. S3 signatures
+ Keepstore now uses "V4 signatures":https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html by default for S3 requests. If you are using Amazon S3, no action is needed; all regions support V4 signatures. If you are using a different S3-compatible service that does not support V4 signatures, add @V2Signature: true@ to your volume driver parameters to preserve the old behavior. See "configuring S3 object storage":{{site.baseurl}}/install/configure-s3-object-storage.html.
  h2(#v2_0_0). v2.0.0 (2020-02-07)
  
  "Upgrading from 1.4":#v1_4_1
index 0efe49c1cb9331621ebb6d141ef55697c52464fe,ebe39e5b223d5dd3283ebae5fb8050dfe1549ace..204f7538bad5fc268d191f9fa58a38aa5f7389a0
@@@ -524,123 -524,54 +524,123 @@@ Clusters
          MaxUUIDEntries:       1000
  
      Login:
 -      # These settings are provided by your OAuth2 provider (eg
 -      # Google) used to perform upstream authentication.
 -      ProviderAppID: ""
 -      ProviderAppSecret: ""
 -
 -      # (Experimental) Authenticate with Google, bypassing the
 -      # SSO-provider gateway service. Use the Google Cloud console to
 -      # enable the People API (APIs and Services > Enable APIs and
 -      # services > Google People API > Enable), generate a Client ID
 -      # and secret (APIs and Services > Credentials > Create
 -      # credentials > OAuth client ID > Web application) and add your
 -      # controller's /login URL (e.g.,
 -      # "https://zzzzz.example.com/login") as an authorized redirect
 -      # URL.
 -      #
 -      # Incompatible with ForceLegacyAPI14. ProviderAppID must be
 -      # blank.
 -      GoogleClientID: ""
 -      GoogleClientSecret: ""
 -
 -      # Allow users to log in to existing accounts using any verified
 -      # email address listed by their Google account. If true, the
 -      # Google People API must be enabled in order for Google login to
 -      # work. If false, only the primary email address will be used.
 -      GoogleAlternateEmailAddresses: true
 -
 -      # (Experimental) Use PAM to authenticate logins, using the
 -      # specified PAM service name.
 -      #
 -      # Cannot be used in combination with OAuth2 (ProviderAppID) or
 -      # Google (GoogleClientID). Cannot be used on a cluster acting as
 -      # a LoginCluster.
 -      PAM: false
 -      PAMService: arvados
 -
 -      # Domain name (e.g., "example.com") to use to construct the
 -      # user's email address if PAM authentication returns a username
 -      # with no "@". If empty, use the PAM username as the user's
 -      # email address, whether or not it contains "@".
 -      #
 -      # Note that the email address is used as the primary key for
 -      # user records when logging in. Therefore, if you change
 -      # PAMDefaultEmailDomain after the initial installation, you
 -      # should also update existing user records to reflect the new
 -      # domain. Otherwise, next time those users log in, they will be
 -      # given new accounts instead of accessing their existing
 -      # accounts.
 -      PAMDefaultEmailDomain: ""
 +      # One of the following mechanisms (SSO, Google, PAM, LDAP, or
 +      # LoginCluster) should be enabled; see
 +      # https://doc.arvados.org/install/setup-login.html
 +
 +      Google:
 +        # Authenticate with Google.
 +        Enable: false
 +
 +        # Use the Google Cloud console to enable the People API (APIs
 +        # and Services > Enable APIs and services > Google People API
 +        # > Enable), generate a Client ID and secret (APIs and
 +        # Services > Credentials > Create credentials > OAuth client
 +        # ID > Web application) and add your controller's /login URL
 +        # (e.g., "https://zzzzz.example.com/login") as an authorized
 +        # redirect URL.
 +        #
 +        # Incompatible with ForceLegacyAPI14. ProviderAppID must be
 +        # blank.
 +        ClientID: ""
 +        ClientSecret: ""
 +
 +        # Allow users to log in to existing accounts using any verified
 +        # email address listed by their Google account. If true, the
 +        # Google People API must be enabled in order for Google login to
 +        # work. If false, only the primary email address will be used.
 +        AlternateEmailAddresses: true
 +
 +      PAM:
 +        # (Experimental) Use PAM to authenticate users.
 +        Enable: false
 +
 +        # PAM service name. PAM will apply the policy in the
 +        # corresponding config file (e.g., /etc/pam.d/arvados) or, if
 +        # there is none, the default "other" config.
 +        Service: arvados
 +
 +        # Domain name (e.g., "example.com") to use to construct the
 +        # user's email address if PAM authentication returns a
 +        # username with no "@". If empty, use the PAM username as the
 +        # user's email address, whether or not it contains "@".
 +        #
 +        # Note that the email address is used as the primary key for
 +        # user records when logging in. Therefore, if you change
 +        # PAMDefaultEmailDomain after the initial installation, you
 +        # should also update existing user records to reflect the new
 +        # domain. Otherwise, next time those users log in, they will
 +        # be given new accounts instead of accessing their existing
 +        # accounts.
 +        DefaultEmailDomain: ""
 +
 +      LDAP:
 +        # Use an LDAP service to authenticate users.
 +        Enable: false
 +
 +        # Server URL, like "ldap://ldapserver.example.com:389" or
 +        # "ldaps://ldapserver.example.com:636".
 +        URL: "ldap://ldap:389"
 +
 +        # Use StartTLS upon connecting to the server.
 +        StartTLS: true
 +
 +        # Skip TLS certificate name verification.
 +        InsecureTLS: false
 +
 +        # Strip the @domain part if a user supplies an email-style
 +        # username with this domain. If "*", strip any user-provided
 +        # domain. If "", never strip the domain part. Example:
 +        # "example.com"
 +        StripDomain: ""
 +
 +        # If, after applying StripDomain, the username contains no "@"
 +        # character, append this domain to form an email-style
 +        # username. Example: "example.com"
 +        AppendDomain: ""
 +
 +        # The LDAP attribute to filter on when looking up a username
 +        # (after applying StripDomain and AppendDomain).
 +        SearchAttribute: uid
 +
 +        # Bind with this username (DN or UPN) and password when
 +        # looking up the user record.
 +        #
 +        # Example user: "cn=admin,dc=example,dc=com"
 +        SearchBindUser: ""
 +        SearchBindPassword: ""
 +
 +        # Directory base for username lookup. Example:
 +        # "ou=Users,dc=example,dc=com"
 +        SearchBase: ""
 +
 +        # Additional filters for username lookup. Special characters
 +        # in assertion values must be escaped (see RFC4515). Example:
 +        # "(objectClass=person)"
 +        SearchFilters: ""
 +
 +        # LDAP attribute to use as the user's email address.
 +        #
 +        # Important: This must not be an attribute whose value can be
 +        # edited in the directory by the users themselves. Otherwise,
 +        # users can take over other users' Arvados accounts trivially
 +        # (email address is the primary key for Arvados accounts.)
 +        EmailAttribute: mail
 +
 +        # LDAP attribute to use as the preferred Arvados username. If
 +        # no value is found (or this config is empty) the username
 +        # originally supplied by the user will be used.
 +        UsernameAttribute: uid
 +
 +      SSO:
 +        # Authenticate with a separate SSO server. (Deprecated)
 +        Enable: false
 +
 +        # ProviderAppID and ProviderAppSecret are generated during SSO
 +        # setup; see
 +        # https://doc.arvados.org/v2.0/install/install-sso.html#update-config
 +        ProviderAppID: ""
 +        ProviderAppSecret: ""
  
        # The cluster ID to delegate the user database.  When set,
        # logins on this cluster will be redirected to the login cluster
            Region: us-east-1a
            Bucket: aaaaa
            LocationConstraint: false
+           V2Signature: false
            IndexPageSize: 1000
            ConnectTimeout: 1m
            ReadTimeout: 10m
index c9d29f814ddddc6d3d443006b823199d2f3e9e93,42c4374c0a13d53ef1c8610aaae59400df854ec5..ec5bc187d7625d504918d8feb8e23abf16e7018c
@@@ -530,123 -530,54 +530,123 @@@ Clusters
          MaxUUIDEntries:       1000
  
      Login:
 -      # These settings are provided by your OAuth2 provider (eg
 -      # Google) used to perform upstream authentication.
 -      ProviderAppID: ""
 -      ProviderAppSecret: ""
 -
 -      # (Experimental) Authenticate with Google, bypassing the
 -      # SSO-provider gateway service. Use the Google Cloud console to
 -      # enable the People API (APIs and Services > Enable APIs and
 -      # services > Google People API > Enable), generate a Client ID
 -      # and secret (APIs and Services > Credentials > Create
 -      # credentials > OAuth client ID > Web application) and add your
 -      # controller's /login URL (e.g.,
 -      # "https://zzzzz.example.com/login") as an authorized redirect
 -      # URL.
 -      #
 -      # Incompatible with ForceLegacyAPI14. ProviderAppID must be
 -      # blank.
 -      GoogleClientID: ""
 -      GoogleClientSecret: ""
 -
 -      # Allow users to log in to existing accounts using any verified
 -      # email address listed by their Google account. If true, the
 -      # Google People API must be enabled in order for Google login to
 -      # work. If false, only the primary email address will be used.
 -      GoogleAlternateEmailAddresses: true
 -
 -      # (Experimental) Use PAM to authenticate logins, using the
 -      # specified PAM service name.
 -      #
 -      # Cannot be used in combination with OAuth2 (ProviderAppID) or
 -      # Google (GoogleClientID). Cannot be used on a cluster acting as
 -      # a LoginCluster.
 -      PAM: false
 -      PAMService: arvados
 -
 -      # Domain name (e.g., "example.com") to use to construct the
 -      # user's email address if PAM authentication returns a username
 -      # with no "@". If empty, use the PAM username as the user's
 -      # email address, whether or not it contains "@".
 -      #
 -      # Note that the email address is used as the primary key for
 -      # user records when logging in. Therefore, if you change
 -      # PAMDefaultEmailDomain after the initial installation, you
 -      # should also update existing user records to reflect the new
 -      # domain. Otherwise, next time those users log in, they will be
 -      # given new accounts instead of accessing their existing
 -      # accounts.
 -      PAMDefaultEmailDomain: ""
 +      # One of the following mechanisms (SSO, Google, PAM, LDAP, or
 +      # LoginCluster) should be enabled; see
 +      # https://doc.arvados.org/install/setup-login.html
 +
 +      Google:
 +        # Authenticate with Google.
 +        Enable: false
 +
 +        # Use the Google Cloud console to enable the People API (APIs
 +        # and Services > Enable APIs and services > Google People API
 +        # > Enable), generate a Client ID and secret (APIs and
 +        # Services > Credentials > Create credentials > OAuth client
 +        # ID > Web application) and add your controller's /login URL
 +        # (e.g., "https://zzzzz.example.com/login") as an authorized
 +        # redirect URL.
 +        #
 +        # Incompatible with ForceLegacyAPI14. ProviderAppID must be
 +        # blank.
 +        ClientID: ""
 +        ClientSecret: ""
 +
 +        # Allow users to log in to existing accounts using any verified
 +        # email address listed by their Google account. If true, the
 +        # Google People API must be enabled in order for Google login to
 +        # work. If false, only the primary email address will be used.
 +        AlternateEmailAddresses: true
 +
 +      PAM:
 +        # (Experimental) Use PAM to authenticate users.
 +        Enable: false
 +
 +        # PAM service name. PAM will apply the policy in the
 +        # corresponding config file (e.g., /etc/pam.d/arvados) or, if
 +        # there is none, the default "other" config.
 +        Service: arvados
 +
 +        # Domain name (e.g., "example.com") to use to construct the
 +        # user's email address if PAM authentication returns a
 +        # username with no "@". If empty, use the PAM username as the
 +        # user's email address, whether or not it contains "@".
 +        #
 +        # Note that the email address is used as the primary key for
 +        # user records when logging in. Therefore, if you change
 +        # PAMDefaultEmailDomain after the initial installation, you
 +        # should also update existing user records to reflect the new
 +        # domain. Otherwise, next time those users log in, they will
 +        # be given new accounts instead of accessing their existing
 +        # accounts.
 +        DefaultEmailDomain: ""
 +
 +      LDAP:
 +        # Use an LDAP service to authenticate users.
 +        Enable: false
 +
 +        # Server URL, like "ldap://ldapserver.example.com:389" or
 +        # "ldaps://ldapserver.example.com:636".
 +        URL: "ldap://ldap:389"
 +
 +        # Use StartTLS upon connecting to the server.
 +        StartTLS: true
 +
 +        # Skip TLS certificate name verification.
 +        InsecureTLS: false
 +
 +        # Strip the @domain part if a user supplies an email-style
 +        # username with this domain. If "*", strip any user-provided
 +        # domain. If "", never strip the domain part. Example:
 +        # "example.com"
 +        StripDomain: ""
 +
 +        # If, after applying StripDomain, the username contains no "@"
 +        # character, append this domain to form an email-style
 +        # username. Example: "example.com"
 +        AppendDomain: ""
 +
 +        # The LDAP attribute to filter on when looking up a username
 +        # (after applying StripDomain and AppendDomain).
 +        SearchAttribute: uid
 +
 +        # Bind with this username (DN or UPN) and password when
 +        # looking up the user record.
 +        #
 +        # Example user: "cn=admin,dc=example,dc=com"
 +        SearchBindUser: ""
 +        SearchBindPassword: ""
 +
 +        # Directory base for username lookup. Example:
 +        # "ou=Users,dc=example,dc=com"
 +        SearchBase: ""
 +
 +        # Additional filters for username lookup. Special characters
 +        # in assertion values must be escaped (see RFC4515). Example:
 +        # "(objectClass=person)"
 +        SearchFilters: ""
 +
 +        # LDAP attribute to use as the user's email address.
 +        #
 +        # Important: This must not be an attribute whose value can be
 +        # edited in the directory by the users themselves. Otherwise,
 +        # users can take over other users' Arvados accounts trivially
 +        # (email address is the primary key for Arvados accounts.)
 +        EmailAttribute: mail
 +
 +        # LDAP attribute to use as the preferred Arvados username. If
 +        # no value is found (or this config is empty) the username
 +        # originally supplied by the user will be used.
 +        UsernameAttribute: uid
 +
 +      SSO:
 +        # Authenticate with a separate SSO server. (Deprecated)
 +        Enable: false
 +
 +        # ProviderAppID and ProviderAppSecret are generated during SSO
 +        # setup; see
 +        # https://doc.arvados.org/v2.0/install/install-sso.html#update-config
 +        ProviderAppID: ""
 +        ProviderAppSecret: ""
  
        # The cluster ID to delegate the user database.  When set,
        # logins on this cluster will be redirected to the login cluster
            Region: us-east-1a
            Bucket: aaaaa
            LocationConstraint: false
+           V2Signature: false
            IndexPageSize: 1000
            ConnectTimeout: 1m
            ReadTimeout: 10m
diff --combined sdk/go/arvados/config.go
index 9f9f00e6445ec676b7ca19877cef1e7b304912e2,880a91ee6965fdd0d4adc2aef3d397a156caf821..1efc87ea72ac6f67496e0b4df931905092f2c6fa
@@@ -135,39 -135,16 +135,39 @@@ type Cluster struct 
                Repositories string
        }
        Login struct {
 -              GoogleClientID                string
 -              GoogleClientSecret            string
 -              GoogleAlternateEmailAddresses bool
 -              PAM                           bool
 -              PAMService                    string
 -              PAMDefaultEmailDomain         string
 -              ProviderAppID                 string
 -              ProviderAppSecret             string
 -              LoginCluster                  string
 -              RemoteTokenRefresh            Duration
 +              LDAP struct {
 +                      Enable             bool
 +                      URL                URL
 +                      StartTLS           bool
 +                      InsecureTLS        bool
 +                      StripDomain        string
 +                      AppendDomain       string
 +                      SearchAttribute    string
 +                      SearchBindUser     string
 +                      SearchBindPassword string
 +                      SearchBase         string
 +                      SearchFilters      string
 +                      EmailAttribute     string
 +                      UsernameAttribute  string
 +              }
 +              Google struct {
 +                      Enable                  bool
 +                      ClientID                string
 +                      ClientSecret            string
 +                      AlternateEmailAddresses bool
 +              }
 +              PAM struct {
 +                      Enable             bool
 +                      Service            string
 +                      DefaultEmailDomain string
 +              }
 +              SSO struct {
 +                      Enable            bool
 +                      ProviderAppID     string
 +                      ProviderAppSecret string
 +              }
 +              LoginCluster       string
 +              RemoteTokenRefresh Duration
        }
        Mail struct {
                MailchimpAPIKey                string
@@@ -259,12 -236,14 +259,14 @@@ type Volume struct 
  }
  
  type S3VolumeDriverParameters struct {
+       IAMRole            string
        AccessKey          string
        SecretKey          string
        Endpoint           string
        Region             string
        Bucket             string
        LocationConstraint bool
+       V2Signature        bool
        IndexPageSize      int
        ConnectTimeout     Duration
        ReadTimeout        Duration