Skip to content

Add secure connection option for S3#2

Closed
DanPlayz0 wants to merge 1 commit intoTicketsBot-cloud:mainfrom
DanPlayz0:feat/support-insecure-s3
Closed

Add secure connection option for S3#2
DanPlayz0 wants to merge 1 commit intoTicketsBot-cloud:mainfrom
DanPlayz0:feat/support-insecure-s3

Conversation

@DanPlayz0
Copy link
Copy Markdown
Contributor

@DanPlayz0 DanPlayz0 commented Mar 4, 2025

This PR adds a feature for users who do not want to deal with TLS with S3. This is mostly a feature for self-hosted instances of the bot.

This pull request includes changes to enhance the configuration and initialization of the S3 client by adding a new configuration option for secure connections.

Configuration enhancement:

  • internal/config/config.go: Added a new Secure boolean field to the Config struct to allow configuration of secure connections to the S3 service. This field is set to true by default.

Initialization update:

  • cmd/import/main.go: Updated the initialization of the S3 client to use the new Secure configuration option instead of a hardcoded true value.

More Pull Requests

@Substrata1
Copy link
Copy Markdown

I made this change previously, and it gets past the initial error, but still tries to force https:// when importing transcripts, for some reason:

import-sync-transcripts-1  | 2025-03-04T19:30:40.685Z   ERROR   daemon/daemon.go:241    Failed to import transcript     {"error": "Get \"https://minio:9000/ticketsbot/?location=\": http: server gave HTTP response to HTTPS client", "attempt": 8}
import-sync-transcripts-1  | github.com/TicketsBot-cloud/import-sync/internal/daemon.(*Daemon).RunTranscriptsOnce
import-sync-transcripts-1  |    github.com/TicketsBot-cloud/import-sync/internal/daemon/daemon.go:241
import-sync-transcripts-1  | main.main
import-sync-transcripts-1  |    github.com/TicketsBot-cloud/import-sync/cmd/import/main.go:89
import-sync-transcripts-1  | runtime.main
import-sync-transcripts-1  |    runtime/proc.go:272

My archive S3 endpoint is http://minio:9000 and my import endpoint is minio:9000. Not sure if this is due to something else in my setup, but I've found no working solutions or workarounds.

@DanPlayz0
Copy link
Copy Markdown
Contributor Author

DanPlayz0 commented Mar 5, 2025

@Substrata1 Did you also update log archiver to support secure: false? As the transcript imports are handled by the logarchiver (at least based off what I understand)

@DanPlayz0
Copy link
Copy Markdown
Contributor Author

PR is being re-created as merge conflicts are not that simple this time around.

@DanPlayz0 DanPlayz0 closed this May 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants