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

Update token.rb #536

Closed
wants to merge 1 commit into from
Closed

Update token.rb #536

wants to merge 1 commit into from

Conversation

EdgeCaseLord
Copy link

Trying to fix this error (#535) by changing the input to_s before trying to match it with the regex

Trying to fix this error (fog#535) by changing the input to_s before trying to match it with the regex
@EdgeCaseLord
Copy link
Author

Using my fixed version, this bug is actually gone, but I still get an auth error

@geemus
Copy link
Member

geemus commented Apr 10, 2024

@badde-media progress at least, as you said. Could you share what your credentials look like (please be sure to sanitize them by putting in placeholder values for any secrets) and the details of the new error you are now seeing? Thanks.

@EdgeCaseLord
Copy link
Author

Hello again, sorry for the late reply. I was getting crazy with some other problems this app had.

This is the storage.yml I've used that finally worked with Infomaniak S3 Object Storage:

infomaniak:
   service: S3
   access_key_id: <%= Rails.application.credentials.dig(:infomaniak, :access_key_id) %>
   secret_access_key: <%= Rails.application.credentials.dig(:infomaniak, :secret_access_key) %>
   region: "us-east-1"
   bucket: "myBucketName"
   endpoint: "https://s3.pub1.infomaniak.cloud"
   public: true

using the version of this gem that I had patched. So I didn't even have to enter the version.
Here's another version that also could connect, as far as I can remember:

 openstack:
     auth:
       auth_url: https://api.pub1.infomaniak.cloud/identity
       username: "username"
       project_id: project_id
       project_name: "project_name"
       user_domain_name: "Default"
     region_name: "dc3-a"
     interface: "public"
     identity_api_version: 3

In this case, the identity_api_version only worked when entered like this, just as an Integer. no "v3" or something like that.

BUT one of the aforementioned problems is that Infomaniak S3 DOES NOT SUPPORT CORS, wich renders this service useless for live-streaming via HTTPS directly from the object storage, and also for direct uploads as ActiveStorage offers it. I guess that Infomaniak want to sell their more expensive audio- and video-streaming servers for this purpose.
This has nothing to do with fog-openstack, but I'm mentioning it just in case that others run into the same problems that I have had, and where you can hardly find any information online. Because of this CORS error, we're now switching most probably to DigitalOcean. This is my DO storage.yml entry that also works using my patched version:

digitalocean:
  service: S3
  endpoint: https://fra1.digitaloceanspaces.com
  access_key_id: <%= Rails.application.credentials.dig(:digitalocean, :access_key) %>
  secret_access_key: <%= Rails.application.credentials.dig(:digitalocean, :secret) %>
  bucket: myBucketName
  region: unused

(nb: do not enter the bucket name in the endpoint url)
This also just for completeness.

I guess we can close this commit, no?

@geemus
Copy link
Member

geemus commented Jun 20, 2024

Thanks for the update, sure I will close for now.

@geemus geemus closed this Jun 20, 2024
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