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

Access to sni-endpoints API #49

Closed
maxehmookau opened this issue Jul 20, 2016 · 22 comments
Closed

Access to sni-endpoints API #49

maxehmookau opened this issue Jul 20, 2016 · 22 comments

Comments

@maxehmookau
Copy link

The new sni-endpoints API appears to be available (albeit in beta) and is being used by the production dashboard at heroku.com.

Is there a general policy against including beta endpoints in the ruby gem? If not, I'll happily put together a PR to add this functionality.

@jalada
Copy link

jalada commented Jul 29, 2016

I've forked the code and re-ran the build against the beta schema: https://github.com/jalada/platform-api

@geemus
Copy link
Contributor

geemus commented Jul 29, 2016

Historically we have left out non-GA stuff from the gem (as it isn't in the core schema yet). I wouldn't go so far to say that this was a policy, so much as coincidence of tooling. I don't think we could really automate this reasonably, since some variants actually change behavior of existing endpoints it would be weird trying to merge them. That said, this may be reflective of it just being about time for us to bring this out of variant and into the main schema. Does that help/make sense?

@maxehmookau
Copy link
Author

@geemus Seems fair. Yep, it makes sense. I'm also an idiot because I didn't realise you could pass custom headers using this gem.

Thanks!

@geemus
Copy link
Contributor

geemus commented Aug 1, 2016

@maxehmookau hey, there are many parts of this gem that are (unfortunately) less than obvious right now. Definitely appreciate your understanding and definitely let us know (or PR) if there are some good fixes to docs or other things to improve the clarity. Thanks!

@chriso0710
Copy link

chriso0710 commented Aug 11, 2016

If I understand correctly: As long as the new features "http-sni" and "sni-endpoints" are in beta, they won't be implemented in the api?

So to use the new features I would do something like
letsencrypt-heroku does kind of "manually" with httparty:
https://github.com/substrakt/letsencrypt-heroku/blob/master/lib/certificate_generation.rb#L78

Thanks!

@maxehmookau
Copy link
Author

@chriso0710, letsencrypt-heroku uses HTTParty although it probably shouldn't since you can set those manual headers using this gem anyway.

https://github.com/heroku/platform-api#passing-custom-headers

@jalada
Copy link

jalada commented Aug 11, 2016

@maxehmookau yes, but that's not enough to access endpoints that aren't in the schema generated when packaging up this gem, because the method isn't defined, right?

@maxehmookau
Copy link
Author

Ah yeah, you are right.

Then letsencrypt-heroku will have to remain using HTTParty for now then.

@chriso0710
Copy link

Thanks, guys!

IMHO the new SNI/SSL feature is really huge and could be worth implementing it as beta into the api.
For now I will use the same method which letsenrypt-heroku uses.
If the new features will become GA and supported by the platform-api, then I will (and should) probably switch.

@geemus
Copy link
Contributor

geemus commented Aug 22, 2016

For now, yes, you need in some capacity to explicitly set the headers. The method described should work, as would other http-libraries used directly (I'm partial to excon/excon), but unfortunately it lacks some of the convenience and syntactic sugar provided by platform-api.

@jalada
Copy link

jalada commented Sep 22, 2016

Now that SNI-based SSL is out of beta will this be supported?

@dmathieu
Copy link

@timurvafin
Copy link

What is the status of implementation of sni endpoints in this gem?

@ukasiu
Copy link

ukasiu commented Dec 15, 2016

+1

@chriso0710
Copy link

Take a look at
https://github.com/jalada/platform-api
which has updated the schema, regenerated the API and seems to support the new SNI features.

This issue should be reopened IMHO.
@geemus What about pulling in the changes from @jalada's repo?

@geemus
Copy link
Contributor

geemus commented Jan 18, 2017

@chriso0710 good call. There are a couple open pull requests relating to regenerating schema and releasing also. Lots of stuff going on, but hoping to get to it pretty soon.

@jalada
Copy link

jalada commented Feb 17, 2017

I would really like to stop telling people to use my fork, as it looks like it might be causing further issues as it falls behind now 😞 pixielabs/letsencrypt-rails-heroku#35

@geemus
Copy link
Contributor

geemus commented Feb 21, 2017

@mathias perhaps you can speak to where we are in this process?

@alexssung
Copy link

Is this going to be fixed?

And why is this ticket closed? This is still an open issue.

@geemus geemus reopened this Mar 13, 2017
@geemus
Copy link
Contributor

geemus commented Mar 13, 2017

It will be fixed, though I'm not sure of exact timing.

I'm not actually certain why it was closed (that was some time ago), I've re-opened.

@david-a-wheeler
Copy link

This appears to be related to pull request 56. Any timeline? Soon? We can't use the new Heroku support for Let's Encrypt, because we use a CDN - so this functionality is important to us.

@mathias
Copy link
Contributor

mathias commented Apr 26, 2017

Hello,

These methods should be present in the 1.0.1 release of this gem.

# in pry:
require 'platform-api'
#=> true
client = PlatformAPI.connect_oauth(ENV['TOKEN'])
#=> #<PlatformAPI::Client:... @client=#<Heroics::Client url="https://api.heroku.com">>
ls -m client.sni_endpoint
#=> PlatformAPI::SniEndpoint#methods: create  delete  info  list  update
client.sni_endpoint.list('young-garden-2012')
#=> []

Hope this helps!

I'm going to close this for now. Feel free to comment+re-open if something is amiss.

@mathias mathias closed this as completed Apr 26, 2017
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

No branches or pull requests

10 participants