AWS Snippets

Install AWS CLI v2 $ curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64-2.0.30.zip" -o "awscliv2.zip" unzip awscliv2.zip sudo ./aws/install AWS Documentation Generate Signed URLs with Linux Tools e.g. for accessing a website behind a CloudFront distribution using a canned policy. Write the policy file policy { "Statement": [ { "Resource": "https://xxxxxxxxxxxx.cloudfront.net/", "Condition": { "DateLessThan": { "AWS:EpochTime": 1648293147 } } } ] } Then apply the following commands[1] - you need to have OpenSSL installed. cat policy | tr -d "\n" | (1) tr -d " \t\n\r" | (2) openssl sha1 -sign private_key.pem | (3) openssl base64 -A | (4) tr -- '+=/' '-_~' (5) ...

March 1, 2018 · 2 min · 371 words · Micha Kops

Distributed Authorization and Contextual Caveats for Java with Macaroons and jmacaroons

Google’s Macaroons are a mechanism to establish distributed authorization. The distinction to the classical bearer-token is their ability that they may be used to perform an action under certain restrictions and may then be used to create a new macaroon with stricter restrictions. The following short tutorial demonstrates how to create macaroons, serialize and deserialize them, add first- and third-party caveats and finally to verify them. Figure 1. jmacaroons example...

May 31, 2017 · 4 min · 852 words · Micha Kops

Continuous Delivery with GitHub Cloud and GitHub Pipelines

Atlassian has added a continuous integration service as a new feature to their GitHub Cloud product. It’s called GitHub Pipelines and it is similar to Travis CI for GitHub offering a nice integration for continuous integration/delivery pipelines for projects hosted on GitHub. It’s still in the beta phase and requires a sign-up but nevertheless I’d like to demonstrate the current state of this service and how easy it is to add scripted pipelines to a project. ...

July 1, 2016 · 4 min · 760 words · Micha Kops