mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2024-12-22 08:48:55 +00:00
Option for IBM IAM auth endpoint
This commit is contained in:
parent
3bf05dabea
commit
d8e12839af
@ -225,6 +225,9 @@ This option requires the IAM role name or "auto". If you specify "auto", s3fs wi
|
||||
\fB\-o\fR ibm_iam_auth ( default is not using IBM IAM authentication )
|
||||
This option instructs s3fs to use IBM IAM authentication. In this mode, the AWSAccessKey and AWSSecretKey will be used as IBM's Service-Instance-ID and APIKey, respectively.
|
||||
.TP
|
||||
\fB\-o\fR ibm_iam_endpoint ( default is https://iam.bluemix.net )
|
||||
Set the URL to use for IBM IAM authentication.
|
||||
.TP
|
||||
\fB\-o\fR use_xattr ( default is not handling the extended attribute )
|
||||
Enable to handle the extended attribute(xattrs).
|
||||
If you set this option, you can use the extended attribute.
|
||||
|
11
src/s3fs.cpp
11
src/s3fs.cpp
@ -4523,6 +4523,17 @@ static int my_fuse_opt_proc(void* data, const char* arg, int key, struct fuse_ar
|
||||
is_ibm_iam_auth = true;
|
||||
return 0;
|
||||
}
|
||||
if(0 == STR2NCMP(arg, "ibm_iam_endpoint=")){
|
||||
std::string endpoint_url = "";
|
||||
std::string iam_endpoint = strchr(arg, '=') + sizeof(char);
|
||||
// Check url for http / https protocol string
|
||||
if((iam_endpoint.compare(0, 8, "https://") != 0) && (iam_endpoint.compare(0, 7, "http://") != 0)) {
|
||||
S3FS_PRN_EXIT("option ibm_iam_endpoint has invalid format, missing http / https protocol");
|
||||
return -1;
|
||||
}
|
||||
endpoint_url = iam_endpoint + "/oidc/token";
|
||||
S3fsCurl::SetIAMCredentialsURL(endpoint_url.c_str());
|
||||
}
|
||||
if(0 == strcmp(arg, "ecs")){
|
||||
if (is_ibm_iam_auth) {
|
||||
S3FS_PRN_EXIT("option ecs cannot be used in conjunction with ibm");
|
||||
|
@ -1209,6 +1209,9 @@ void show_help (void)
|
||||
" In this mode, the AWSAccessKey and AWSSecretKey will be used as\n"
|
||||
" IBM's Service-Instance-ID and APIKey, respectively.\n"
|
||||
"\n"
|
||||
" ibm_iam_endpoint (default is https://iam.bluemix.net)\n"
|
||||
" - sets the url to use for IBM IAM authentication.\n"
|
||||
"\n"
|
||||
" use_xattr (default is not handling the extended attribute)\n"
|
||||
" Enable to handle the extended attribute(xattrs).\n"
|
||||
" If you set this option, you can use the extended attribute.\n"
|
||||
|
Loading…
Reference in New Issue
Block a user