Updated tenant creation credentials download to allow mc alias import (#1683)
Removed underscore from credentials Made credentials download output match mc alias import expected format Added URL to createServiceAccountCreds return
This commit is contained in:
@@ -164,7 +164,7 @@ const CredentialsPrompt = ({
|
||||
</div>
|
||||
) : (
|
||||
<div className={classes.warningBlock}>
|
||||
<WarnIcon />
|
||||
<WarnIcon />
|
||||
<span>
|
||||
Write these down, as this is the only time the secret will be
|
||||
displayed.
|
||||
@@ -194,30 +194,23 @@ const CredentialsPrompt = ({
|
||||
if (consoleCreds) {
|
||||
if (!Array.isArray(consoleCreds)) {
|
||||
consoleExtras = {
|
||||
console: [
|
||||
{
|
||||
url: consoleCreds.url,
|
||||
access_key: consoleCreds.accessKey,
|
||||
secret_key: consoleCreds.secretKey,
|
||||
accessKey: consoleCreds.accessKey,
|
||||
secretKey: consoleCreds.secretKey,
|
||||
api: "s3v4",
|
||||
path: "auto",
|
||||
},
|
||||
],
|
||||
};
|
||||
} else {
|
||||
const cCreds = consoleCreds.map((itemMap) => {
|
||||
return {
|
||||
url: itemMap.url,
|
||||
access_key: itemMap.accessKey,
|
||||
secret_key: itemMap.secretKey,
|
||||
accessKey: itemMap.accessKey,
|
||||
secretKey: itemMap.secretKey,
|
||||
api: "s3v4",
|
||||
path: "auto",
|
||||
};
|
||||
});
|
||||
|
||||
consoleExtras = {
|
||||
console: [...cCreds],
|
||||
};
|
||||
consoleExtras = cCreds[0];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -128,7 +128,6 @@ func createServiceAccount(ctx context.Context, userClient MinioAdmin, policy str
|
||||
}
|
||||
iamPolicy = iamp
|
||||
}
|
||||
|
||||
creds, err := userClient.addServiceAccount(ctx, iamPolicy, "", "", "")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -148,12 +147,11 @@ func createServiceAccountCreds(ctx context.Context, userClient MinioAdmin, polic
|
||||
}
|
||||
iamPolicy = iamp
|
||||
}
|
||||
|
||||
creds, err := userClient.addServiceAccount(ctx, iamPolicy, "", accessKey, secretKey)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &models.ServiceAccountCreds{AccessKey: creds.AccessKey, SecretKey: creds.SecretKey}, nil
|
||||
return &models.ServiceAccountCreds{AccessKey: creds.AccessKey, SecretKey: creds.SecretKey, URL: getMinIOServer()}, nil
|
||||
}
|
||||
|
||||
// getCreateServiceAccountResponse creates a service account with the defined policy for the user that
|
||||
@@ -214,7 +212,7 @@ func createAUserServiceAccountCreds(ctx context.Context, userClient MinioAdmin,
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &models.ServiceAccountCreds{AccessKey: creds.AccessKey, SecretKey: creds.SecretKey}, nil
|
||||
return &models.ServiceAccountCreds{AccessKey: creds.AccessKey, SecretKey: creds.SecretKey, URL: getMinIOServer()}, nil
|
||||
}
|
||||
|
||||
// getCreateServiceAccountResponse creates a service account with the defined policy for the user that
|
||||
|
||||
Reference in New Issue
Block a user