Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

希望在对象存储的引擎中添加session_token可选字段 #4761

Closed
3 of 4 tasks
QJZX opened this issue Jul 13, 2023 · 3 comments
Closed
3 of 4 tasks

希望在对象存储的引擎中添加session_token可选字段 #4761

QJZX opened this issue Jul 13, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@QJZX
Copy link

QJZX commented Jul 13, 2023

Please make sure of the following things

  • I have read the documentation.
  • I'm sure there are no duplicate issues or discussions.
  • I'm sure this feature is not implemented.
  • I'm sure it's a reasonable and popular requirement.

Description of the feature / 需求描述

我看到alist/drivers/s3/util.go:25credentials.NewStaticCredentials(d.AccessKeyID, d.SecretAccessKey, ""),第三个字段是空的。

但在一些场景下是需要自定义填写的,比如我遇到了 😭 。

我需要AccessKeyId、SecretAccessKey、SessionToken三者同时使用才可以正常访问,因为我的角色是临时被授予的。[悲]

Suggested solution / 实现思路

在创建引擎时传入第三个字段的信息即可。

Additional context / 附件

No response

@QJZX QJZX added the enhancement New feature or request label Jul 13, 2023
@welcome
Copy link

welcome bot commented Jul 13, 2023

Thanks for opening your first issue here! Be sure to follow the issue template!

@xhofe xhofe closed this as completed in d2ff040 Jul 13, 2023
@anwen-anyi
Copy link
Contributor

这样是不是多吉云可以使用了? 两段式的token可以用了?

@QJZX
Copy link
Author

QJZX commented Jul 15, 2023

我是在aws s3上使用主token签发的临时token,这个临时token是id、sec_key、session_key形式的,因此需要把这三者补全才能正常使用。

但发现还是存在些bug,重命名时总是提示对象的key(对象的完整路径)不存在,在winscp上没这个问题。

看了下s3的重命名的代码逻辑,看不出什么问题,挺奇特的。

查资料时说对象的key不合法时会提示异常,但winscp不知为何没这个异常。

我的对象的key中包含的字符有:“小写字母、下划线、数字、汉字、文件后缀名用到的.”。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants