hologram
hologram copied to clipboard
Simple feature idea: URL generation
hologram url
could write a federated access URL for your current hologram user to stdout. On a Mac, you could then run hologram url | xargs open
and it would pop open a browser pointing at the AWS console.
The logic for this could live in pure client code and wouldn't need any protocol modifications. I'm pretty sure I could implement it in a handful of lines if you were interested.
My main concern about this is that the logic doesn't really feel specific to hologram. We'd just be running a standard STS operation against the current instance credentials. Putting it under hologram would thus be just for the sake of a consistent Amazon "user experience", rather than because it needs to be here.
Thoughts?
I have a similar concern, as in we have to be careful not to bloat hologram with tons of options/features, but that does sound like it might be useful for some people without affecting the core functionality, so I'd be happy to review any PR you might want to send our way.
from boto import sts
import requests
import simplejson as json
import urllib
conn = sts.STSConnection()
role = conn.assume_role('
session = { "sessionId":role.credentials.access_key,"sessionKey":role.credentials.secret_key,"sessionToken":role.credentials.session_token}
params = { "Action":"getSigninToken","Session":json.dumps(session)}
r=requests.get("https://signin.aws.amazon.com/federation", params=params)
token=json.loads(r.text)['SigninToken']
params2 = { "Action":"login", "Issuer":"adroll.com","Destination":" https://console.aws.amazon.com/console/home","SigninToken":token}
print "https://signin.aws.amazon.com/federation?{} ".format(urllib.urlencode(params2))
neat. i just verified this works with hologram.
On Wed, Apr 1, 2015 at 10:18 AM, Fran Garcia [email protected] wrote:
I have a similar concern, as in we have to be careful not to bloat hologram with tons of options/features, but that does sound like it might be useful for some people without affecting the core functionality, so I'd be happy to review any PR you might want to send our way.
— Reply to this email directly or view it on GitHub https://github.com/AdRoll/hologram/issues/37#issuecomment-88562444.
Yeah, I use something similar except with the current credentials instead of another STS call. Just figured it would be smooth to add to the CLI :)
On Thursday, April 2, 2015, Walter King [email protected] wrote:
from boto import sts
import requests
import simplejson as json
import urllib
conn = sts.STSConnection()
role = conn.assume_role('
,' ') session = {
"sessionId":role.credentials.access_key,"sessionKey":role.credentials.secret_key,"sessionToken":role.credentials.session_token}
params = { "Action":"getSigninToken","Session":json.dumps(session)}
r=requests.get("https://signin.aws.amazon.com/federation", params=params)
token=json.loads(r.text)['SigninToken']
params2 = { "Action":"login", "Issuer":"adroll.com","Destination":" https://console.aws.amazon.com/console/home","SigninToken":token}
print "https://signin.aws.amazon.com/federation?{} ".format(urllib.urlencode(params2))
neat. i just verified this works with hologram.
On Wed, Apr 1, 2015 at 10:18 AM, Fran Garcia <[email protected] javascript:_e(%7B%7D,'cvml','[email protected]');> wrote:
I have a similar concern, as in we have to be careful not to bloat hologram with tons of options/features, but that does sound like it might be useful for some people without affecting the core functionality, so I'd be happy to review any PR you might want to send our way.
— Reply to this email directly or view it on GitHub https://github.com/AdRoll/hologram/issues/37#issuecomment-88562444.
— Reply to this email directly or view it on GitHub https://github.com/AdRoll/hologram/issues/37#issuecomment-89066523.
I took a slightly different approach to the same problem and made a Chrome extension that leverages instance metadata to open the console. Closed this issue by building Holochrome.