Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
Gyshido

George Angel george-angel

:octocat:
Gyshido
View GitHub Profile
@george-angel
george-angel / spec.md
Last active Jul 23, 2020
2020-07 kube-applier spec
View spec.md

kube-applier v3

server

applied namespace

@george-angel
george-angel / doc.md
Created Jan 8, 2020
AWS IAM role boundary excpection example
View doc.md

We have an s3 bucket with an inline resource-based policy granting full access to an iam user and an iam role. Both principals (user and role) have no identity-based policies and are bounded by a policy allowing only sts:GetCallerIdentity. Since resource-based policies are not affected by permissions boundaries, both principals should be able to get objects from the bucket. However, only the user can, the role gets "Access Denied". If we remove the permission boundary from the role, then it can get the object without issue. This is the behaviour we find confusing

We are assuming the role via aws cli, so I don't think session policies are getting in the way (plus removing the boundary from the role fixes the problem, so the boundary seems to be the entity blocking access).

Below are the details of the scenario. Let me know if you need anything else, either by email or slack. Thanks!

Details:

Bucket policy:

@george-angel
george-angel / rs-ns
Last active Feb 8, 2018
Kubernetes resources per namespace
View rs-ns
#!/bin/bash
## usage: ./rs-ns <kube-context> | sort -h -k 2 -r
export env=${1}
total() {
ns=${1}
echo "${ns} $(kubectl --context=${env} -n${ns} top pod | tail -n +2 | awk '{print $3}' | cut -d'M' -f1 | paste -s -d+ - | bc) "
}