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

[BUG] OSS setting PUBLICREAD will cause inaccessibility #184

Closed
cipchk opened this issue Sep 5, 2024 · 3 comments
Closed

[BUG] OSS setting PUBLICREAD will cause inaccessibility #184

cipchk opened this issue Sep 5, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@cipchk
Copy link

cipchk commented Sep 5, 2024

OpenIM Server Version

3.8.0

Operating System and CPU Architecture

Linux (AMD)

Deployment Method

Docker Deployment

Bug Description and Steps to Reproduce

事实上在 openimsdk/open-im-server#2317 已经有人报告过,但是被自动关闭了。

OPENIM_RPC_THIRD_OBJECT_ENABLE=oss
OPENIM_RPC_THIRD_OBJECT_OSS_ENDPOINT=https://xxxx.aliyuncs.com
OPENIM_RPC_THIRD_OBJECT_OSS_BUCKET=xxx-im
OPENIM_RPC_THIRD_OBJECT_OSS_BUCKETURL=https://xxxx.xxxx.xxxx
OPENIM_RPC_THIRD_OBJECT_OSS_ACCESSKEYID=xxxxx
OPENIM_RPC_THIRD_OBJECT_OSS_ACCESSKEYSECRET=xxxxx
OPENIM_RPC_THIRD_OBJECT_OSS_PUBLICREAD=true # 是否公开读取

Docker compose:

      - IMENV_OPENIM_RPC_THIRD_OBJECT_ENABLE=${OPENIM_RPC_THIRD_OBJECT_ENABLE}
      - IMENV_OPENIM_RPC_THIRD_OBJECT_OSS_ENDPOINT=${OPENIM_RPC_THIRD_OBJECT_OSS_ENDPOINT}
      - IMENV_OPENIM_RPC_THIRD_OBJECT_OSS_BUCKET=${OPENIM_RPC_THIRD_OBJECT_OSS_BUCKET}
      - IMENV_OPENIM_RPC_THIRD_OBJECT_OSS_BUCKETURL=${OPENIM_RPC_THIRD_OBJECT_OSS_BUCKETURL}
      - IMENV_OPENIM_RPC_THIRD_OBJECT_OSS_ACCESSKEYID=${OPENIM_RPC_THIRD_OBJECT_OSS_ACCESSKEYID}
      - IMENV_OPENIM_RPC_THIRD_OBJECT_OSS_ACCESSKEYSECRET=${OPENIM_RPC_THIRD_OBJECT_OSS_ACCESSKEYSECRET}
      - IMENV_OPENIM_RPC_THIRD_OBJECT_OSS_PUBLICREAD=${OPENIM_RPC_THIRD_OBJECT_OSS_PUBLICREAD}

图片的请求地址为:

https://im_api(port: 10002)/api/object/3/msg_picture_cc83598702168c07b2533b125b340f6d.jpg

会被 302 跳转到

请求网址:
https://xxx-im.oss-xxxx.aliyuncs.com/openim%2Fdata%2Fhash%2F14b34f8be36f792d0dc61c876df69129
请求方法:
GET
状态代码:
403 Forbidden

另外一个细节就是BUCKETURL

当我设置提自己的域名时(OSS已经绑定正确了),但是消息里面依然还是使用 OSS 域的址,就像 https://xxx-im.oss-xxxx.aliyuncs.com/openim%2Fdata%2Fhash%2F14b34f8be36f792d0dc61c876df69129 ,依然使用的是 aliyuncs.cm,而不是我所配置的域名。

当然这一点我不确认是不是因为 publicRead 错误产生的并发症。

Screenshots Link

No response

@cipchk cipchk added the bug Something isn't working label Sep 5, 2024
@OpenIM-Robot OpenIM-Robot changed the title [BUG] OSS 设置PUBLICREAD会导致无法访问 [BUG] OSS setting PUBLICREAD will cause inaccessibility Sep 5, 2024
@skiffer-git skiffer-git transferred this issue from openimsdk/open-im-server Sep 26, 2024
@WindRain20140210
Copy link

I have the same problem, can help solve it?

@cipchk
Copy link
Author

cipchk commented Oct 16, 2024

看起来 Docker issues 维护不是很积极,我将在 openimsdk/open-im-server#2727 重新开放,关掉这个。

@cipchk cipchk closed this as completed Oct 16, 2024
@OpenIM-Robot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


It seems that Docker issues are not actively maintained, I will reopen it at openimsdk/open-im-server#2727 and close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants