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

feature request: Support storage connectors #6920

Closed
anyidea opened this issue Jan 4, 2025 · 4 comments
Closed

feature request: Support storage connectors #6920

anyidea opened this issue Jan 4, 2025 · 4 comments

Comments

@anyidea
Copy link
Contributor

anyidea commented Jan 4, 2025

What problem did you meet?

Currently, Logto does not have a storage connector that can interact with object storage services that support the S3 protocol. This absence limits users from directly uploading images, such as profile pictures and brand logos, within the application.

Describe what you'd like Logto to have

I propose the addition of a storage connector for Logto that supports S3-compatible object storage services. This would include services like AWS S3, MinIO, and Google Cloud Storage. By implementing this feature, users would be able to upload their profile pictures and brand logos directly through Logto, significantly enhancing the application's usability and overall user experience.

@anyidea anyidea changed the title feature request: Storage Connectors support feature request: Storage connectors support Jan 4, 2025
@anyidea anyidea changed the title feature request: Storage connectors support feature request: Support storage connectors Jan 4, 2025
@wangsijie
Copy link
Contributor

This is called Storage Provider: https://docs.logto.io/logto-oss/file-storage-provider

@anyidea
Copy link
Contributor Author

anyidea commented Jan 6, 2025

This is called Storage Provider: https://docs.logto.io/logto-oss/file-storage-provider

I've checked the source code, and it currently only supports AWS S3 for storage. It doesn't support other object storage services that also use the S3 protocol, as it seems that the returned endpoint URL is hardcoded.

This piece of code does not respect the endpoint parameter. Additionally, other supported parameters for the S3 client could be added, among which the addressing style (virtual-hosted style and path style) is quite important.

url: `https://${bucket}.s3.${finalRegion}.amazonaws.com/${objectKey}`,

anyidea pushed a commit to anyidea/logto that referenced this issue Jan 6, 2025
Add support for configurable S3 endpoint and addressing style (path-style/virtual-hosted)
to improve compatibility with S3-compatible storage services.

- Add forcePathStyle option to control URL addressing style
- Fix custom endpoint support implementation
- Improve URL generation logic for different configurations

Resolves: [logto-io#6920]
anyidea pushed a commit to anyidea/logto that referenced this issue Jan 6, 2025
Add support for configurable S3 endpoint and addressing style (path-style/virtual-hosted)
to improve compatibility with S3-compatible storage services.

- Add forcePathStyle option to control URL addressing style
- Fix custom endpoint support implementation
- Improve URL generation logic for different configurations

Resolves: [logto-io#6920]

chore: format codes
anyidea pushed a commit to anyidea/logto that referenced this issue Jan 6, 2025
Add support for configurable S3 endpoint and addressing style (path-style/virtual-hosted)
to improve compatibility with S3-compatible storage services.

- Add forcePathStyle option to control URL addressing style
- Fix custom endpoint support implementation
- Improve URL generation logic for different configurations

Resolves: [logto-io#6920]
anyidea pushed a commit to anyidea/logto that referenced this issue Jan 6, 2025
Add support for configurable S3 endpoint and addressing style (path-style/virtual-hosted)
to improve compatibility with S3-compatible storage services.

- Add forcePathStyle option to control URL addressing style
- Fix custom endpoint support implementation
- Improve URL generation logic for different configurations

Resolves: [logto-io#6920]
anyidea pushed a commit to anyidea/logto that referenced this issue Jan 6, 2025
Add support for configurable S3 endpoint and addressing style (path-style/virtual-hosted)
to improve compatibility with S3-compatible storage services.

- Add forcePathStyle option to control URL addressing style
- Fix custom endpoint support implementation
- Improve URL generation logic for different configurations

Resolves: [logto-io#6920]
anyidea pushed a commit to anyidea/logto that referenced this issue Jan 6, 2025
Add support for configurable S3 endpoint and addressing style (path-style/virtual-hosted)
to improve compatibility with S3-compatible storage services.

- Add forcePathStyle option to control URL addressing style
- Fix custom endpoint support implementation
- Improve URL generation logic for different configurations

Resolves: [logto-io#6920]
anyidea pushed a commit to anyidea/logto that referenced this issue Jan 7, 2025
Add support for configurable S3 endpoint and addressing style (path-style/virtual-hosted)
to improve compatibility with S3-compatible storage services.

- Add forcePathStyle option to control URL addressing style
- Fix custom endpoint support implementation
- Improve URL generation logic for different configurations

Resolves: [logto-io#6920]
@wangsijie
Copy link
Contributor

You PR looks good, thanks for your contribution.l

anyidea pushed a commit to anyidea/logto that referenced this issue Jan 7, 2025
Add support for configurable S3 endpoint and addressing style (path-style/virtual-hosted)
to improve compatibility with S3-compatible storage services.

- Add forcePathStyle option to control URL addressing style
- Fix custom endpoint support implementation
- Improve URL generation logic for different configurations

Resolves: [logto-io#6920]
Signed-off-by: aiden_lu <[email protected]>
anyidea pushed a commit to anyidea/logto that referenced this issue Jan 7, 2025
Add support for configurable S3 endpoint and addressing style (path-style/virtual-hosted)
to improve compatibility with S3-compatible storage services.

- Add forcePathStyle option to control URL addressing style
- Fix custom endpoint support implementation
- Improve URL generation logic for different configurations

Resolves: [logto-io#6920]
Signed-off-by: aiden_lu <[email protected]>
anyidea pushed a commit to anyidea/logto that referenced this issue Jan 7, 2025
Add support for configurable S3 endpoint and addressing style (path-style/virtual-hosted)
to improve compatibility with S3-compatible storage services.

- Add forcePathStyle option to control URL addressing style
- Fix custom endpoint support implementation
- Improve URL generation logic for different configurations

Resolves: [logto-io#6920]
Signed-off-by: aiden_lu <[email protected]>
anyidea added a commit to anyidea/logto that referenced this issue Jan 7, 2025
Add support for configurable S3 endpoint and addressing style (path-style/virtual-hosted)
to improve compatibility with S3-compatible storage services.

- Add forcePathStyle option to control URL addressing style
- Fix custom endpoint support implementation
- Improve URL generation logic for different configurations

Resolves: [logto-io#6920]
Signed-off-by: aiden_lu <[email protected]>
anyidea added a commit to anyidea/logto that referenced this issue Jan 7, 2025
Add support for configurable S3 endpoint and addressing style (path-style/virtual-hosted)
to improve compatibility with S3-compatible storage services.

- Add forcePathStyle option to control URL addressing style
- Fix custom endpoint support implementation
- Improve URL generation logic for different configurations

Resolves: [logto-io#6920]
Signed-off-by: aiden_lu <[email protected]>
anyidea added a commit to anyidea/logto that referenced this issue Jan 7, 2025
Add support for configurable S3 endpoint and addressing style (path-style/virtual-hosted)
to improve compatibility with S3-compatible storage services.

- Add forcePathStyle option to control URL addressing style
- Fix custom endpoint support implementation
- Improve URL generation logic for different configurations

Resolves: [logto-io#6920]
Signed-off-by: aiden_lu <[email protected]>
wangsijie pushed a commit that referenced this issue Jan 8, 2025
Add support for configurable S3 endpoint and addressing style (path-style/virtual-hosted)
to improve compatibility with S3-compatible storage services.

- Add forcePathStyle option to control URL addressing style
- Fix custom endpoint support implementation
- Improve URL generation logic for different configurations

Resolves: [#6920]

Signed-off-by: aiden_lu <[email protected]>
@anyidea
Copy link
Contributor Author

anyidea commented Jan 9, 2025

#6924 resolved

@anyidea anyidea closed this as completed Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants