Using SAML on AWS from the CLI

Hey folks, I just wanted to write up a quick post about how I’m using SAML to login to the AWS CLI at work. There is plenty of content out there for how to configure access to the AWS console so I’m not going to talk about that. Instead, I will focus on how to use SAML for command line access using the AWS CLI tools. Specifically, how to get it working with Azure MFA and some of the issues I have run into along the way.

First, you can access the fully working sample at https://github.com/asagage/aws-saml-cli. Please feel free to fork, PR raise issues etc.

This code is based off the blog post here https://aws.amazon.com/blogs/security/how-to-implement-a-general-solution-for-federated-apicli-access-using-saml-2-0/ but was tweaked to work with Azure MFA.

By using this tool, now you can simply type `saml` at the mac command prompt, enter your username and password, authenticate on your MFA authenticator, then choose which SAML role to assume. The script will save your sts token into your shell for immediate use and store the credentials in your aws config profile under the “saml” profile for use up to one hour later.

When trying to follow the guide above, I ran into issues where the flow was a bit different since we were using Azure MFA in addition to ADFS. After a lot of trial and effort, I found the right parameters and syntax to get the requests fired off and to get a valid SAML response.

One issue we had was there was a different UI experience in Azure MFA if a user had a phone number set in the directory or not. So if you are seeing odd issues where the flow is different for different users, check the phone number field in Active directory.

Also please be aware that the max duration these credentials can be used is 1 hour due to a limit on the AssumeRoleWithSAML API call. Although you can extend this timeout with simple MFA on an IAM user, you can not extend this when assuming a SAML role.

How to change your life with a Rubik’s Cube

What if I told you that by playing with a simple children’s toy, you could better handle difficult challenges at work and in your personal life? Would you try it or would you just read this and tell yourself “that’s interesting, but I don’t really think it would do anything for me?” I found a secret in a common toy that will help you unlock your potential for life-long learning, upgrade your tenacity, and improve your ability to solve difficult problems in life and work. There have been over 350 million Rubik’s cubes sold, making it the best-selling toy of all time. Yet it is estimated that only 1% of people above age 10 in the US can actually solve the Rubik’s cube. Continue reading How to change your life with a Rubik’s Cube

Simon Sinek Video 04/2012

Simon’s “start with why” philosophy has been integral to Next Jump’s culture.  Simon Sinek teaches leaders and organizations how to inspire people. With a bold goal to help build a world in which the vast majority of people go home everyday feeling fulfilled by their work, Sinek is leading a movement to inspire people to do the things that inspire them.

 

2012/04 Simon Sinek from CreativeMornings on Vimeo.

Business Tax Forms

I found a cool web site for completing 1099 and w-2 forms for only $2.95 each.  This site is great for small businesses who need to file these forms and it enables you to easily get the job done affordably.  www.QuickEmployerForms.com

From their website:

Quick Employer Forms is for small business owners who have employees or use independent contractors to help them get their work done.

If you operated a business (including a Schedule C/Sole Proprietorship, an LLC, Corporation, S-Corp, or Partnership) and you had employees or independent contractors, you need to send a W-2 to employees or 1099 to independent contractors before the end of January. Quick Employer Forms makes it a lot easier to create and file these forms with the IRS. There’s no need to buy forms or worry about special printing requirements, including colored ink. For additional business banking needs you can get more info online.

Quick Employer Forms is an online tool that allows small business owners to quickly and easily create W-2s and 1099s (as well as other required forms). It asks you easy questions, and then completes the forms for you automatically. It even e-files the forms and can mail required copies to your employees and contractors (you can of course mail them yourself if you prefer). It also creates other forms required by law, such as quarterly (Form 941) and annual (Form 940) payroll forms. If you are looking for loan options for your business visit https://www.sofi.com/money/.

Unfortunately, the deadline for filing these has passed for 2009, but you can definitely bookmark this url for next year.