mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2025-02-03 11:08:26 +00:00
Merge pull request #774 from nkkashyap/master
Option for IAM authentication endpoint
This commit is contained in:
commit
1b9ec7f4fc
@ -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 )
|
\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.
|
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
|
.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 )
|
\fB\-o\fR use_xattr ( default is not handling the extended attribute )
|
||||||
Enable to handle the extended attribute(xattrs).
|
Enable to handle the extended attribute(xattrs).
|
||||||
If you set this option, you can use the extended attribute.
|
If you set this option, you can use the extended attribute.
|
||||||
|
12
src/s3fs.cpp
12
src/s3fs.cpp
@ -4523,6 +4523,18 @@ static int my_fuse_opt_proc(void* data, const char* arg, int key, struct fuse_ar
|
|||||||
is_ibm_iam_auth = true;
|
is_ibm_iam_auth = true;
|
||||||
return 0;
|
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());
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
if(0 == strcmp(arg, "ecs")){
|
if(0 == strcmp(arg, "ecs")){
|
||||||
if (is_ibm_iam_auth) {
|
if (is_ibm_iam_auth) {
|
||||||
S3FS_PRN_EXIT("option ecs cannot be used in conjunction with ibm");
|
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"
|
" In this mode, the AWSAccessKey and AWSSecretKey will be used as\n"
|
||||||
" IBM's Service-Instance-ID and APIKey, respectively.\n"
|
" IBM's Service-Instance-ID and APIKey, respectively.\n"
|
||||||
"\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"
|
" use_xattr (default is not handling the extended attribute)\n"
|
||||||
" Enable to handle the extended attribute(xattrs).\n"
|
" Enable to handle the extended attribute(xattrs).\n"
|
||||||
" If you set this option, you can use the extended attribute.\n"
|
" If you set this option, you can use the extended attribute.\n"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user