Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for NewIAMRoleARN (0.1 sec)

  1. internal/arn/arn.go

    // Allows english letters, numbers, '.', '-', '_' and '/'. Starts with a
    // letter or digit. At least 1 character long.
    var validResourceIDRegex = regexp.MustCompile(`[A-Za-z0-9_/\.-]+$`)
    
    // NewIAMRoleARN - returns an ARN for a role in MinIO.
    func NewIAMRoleARN(resourceID, serverRegion string) (ARN, error) {
    	if !validResourceIDRegex.MatchString(resourceID) {
    		return ARN{}, fmt.Errorf("invalid resource ID: %s", resourceID)
    	}
    	return ARN{
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Apr 04 08:31:34 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  2. internal/arn/arn_test.go

    		},
    	}
    	for _, tt := range tests {
    		t.Run(tt.name, func(t *testing.T) {
    			got, err := NewIAMRoleARN(tt.args.resourceID, tt.args.serverRegion)
    			if (err != nil) != tt.wantErr {
    				t.Errorf("NewIAMRoleARN() error = %v, wantErr %v", err, tt.wantErr)
    				return
    			}
    			if !reflect.DeepEqual(got, tt.want) {
    				t.Errorf("NewIAMRoleARN() got = %v, want %v", got, tt.want)
    			}
    		})
    	}
    }
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Apr 04 08:31:34 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  3. internal/config/identity/openid/openid.go

    // DummyRoleARN is used to indicate that the user associated with it was
    // authenticated via policy-claim based OpenID provider.
    var DummyRoleARN = func() arn.ARN {
    	v, err := arn.NewIAMRoleARN("dummy-internal", "")
    	if err != nil {
    		panic("should not happen!")
    	}
    	return v
    }()
    
    // Config - OpenID Config
    type Config struct {
    	Enabled bool
    
    	// map of roleARN to providerCfg's
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Jul 10 20:16:44 UTC 2024
    - 16.6K bytes
    - Viewed (0)
  4. internal/config/identity/plugin/config.go

    			return args, config.Errorf("Role ID must match the regexp `^[a-zA-Z0-9_-]+$`")
    		}
    
    		// Use the user provided ID here.
    		resourceID += roleID
    	}
    
    	roleArn, err := arn.NewIAMRoleARN(resourceID, serverRegion)
    	if err != nil {
    		return args, config.Errorf("unable to generate ARN from the plugin config: %v", err)
    	}
    
    	args = Args{
    		URL:         u,
    		AuthToken:   authToken,
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 13.3K bytes
    - Viewed (0)
Back to top