When working with multiple AWS accounts, it can be a pain to keep signing out and signing back in. I work with a number of accounts, my own, customer accts, burner accts, etc. It was a pain to keep logging in and out of the AWS Console. Thankfully the AWS Console has a "Role Switcher" that lets you quickly switch between accounts built-in. It does this by assuming a role from another account. Here's how to set that up...
fastlane_version "2.76.1" | |
default_platform :ios | |
platform :ios do | |
####### Certificates ####### | |
desc "Installs the certificates and profiles locally" | |
lane :certificates do |options| |
First of all, please note that token expiration and revoking are two different things.
- Expiration only happens for web apps, not for native mobile apps, because native apps never expire.
- Revoking only happens when (1) uses click the logout button on the website or native Apps;(2) users reset their passwords; (3) users revoke their tokens explicitly in the administration panel.
A JWT token that never expires is dangerous if the token is stolen then someone can always access the user's data.
Quoted from JWT RFC:
class ApplicationController < ActionController::Base | |
before_filter :ensure_xhr | |
private | |
def ensure_xhr | |
if request.get? && request.format && (request.format.js? || request.format.json?) | |
head :forbidden unless request.xhr? | |
end | |
end | |
end |
This is a mix between two sources:
- http://www.alfielapeter.com/posts/8-transferring-s3-bucket-contents-between-accounts-with-s3cmd
- and http://blog.techopsguru.com/2011/12/s3-bucket-copying-with-multiple-accounts.html
basically the first resource is great but didn't work for me: I had to remove the trailing "/*" in the resource string to make it work. I also noticed that setting the policy on the source bucket was sufficient. In the end these are the exact steps I followed to copy data between two buckets on two accounts
Basically the idea there is:
- we allowe the destination account to read the source bucket (in the console for the source account)
- we log as the destination and start the copy
- (void)presentViewControllerFromVisibleViewController:(UIViewController *)viewControllerToPresent | |
{ | |
if ([self isKindOfClass:[UINavigationController class]]) { | |
UINavigationController *navController = (UINavigationController *)self; | |
[navController.topViewController presentViewControllerFromVisibleViewController:viewControllerToPresent]; | |
} else if (self.presentedViewController) { | |
[self.presentedViewController presentViewControllerFromVisibleViewController:viewControllerToPresent]; | |
} else { | |
[self presentModalViewController:viewControllerToPresent animated:YES]; | |
} |
i386 : iPhone Simulator | |
x86_64 : iPhone Simulator | |
arm64 : iPhone Simulator | |
iPhone1,1 : iPhone | |
iPhone1,2 : iPhone 3G | |
iPhone2,1 : iPhone 3GS | |
iPhone3,1 : iPhone 4 | |
iPhone3,2 : iPhone 4 GSM Rev A | |
iPhone3,3 : iPhone 4 CDMA | |
iPhone4,1 : iPhone 4S |
Wes Winham winhamwr@gmail.com
There are many tutorials floating around the web that almost get you a dynamic VPN in EC2. The goal of this tutorial is to be a one-stop-shop for this specific setup.