menu

Top Categories

Spotlight

todayNovember 25, 2022

industry Jake

9 ways to give access to an internal tool

The following is a work of fiction. However all the solutions are real things I’ve attempted in my time as a Cloud Consultant. Image this, you’re minding your own business when an empowered developer pops out of nowhere. They need to get an application deployed. You begin to open your [...]


Cleaning up users in 1password

vendor guides + secure development Jake todayJune 10, 2020 164

Background
share close

Recently I was helping a company audit their 1password account. Thought I’d share some useful snippets using jq and the 1password CLI tool.

This command suspends users who haven’t logged in for 3 months

op list users | jq -r '.[] | .uuid' | xargs -iUSER op get user USER | jq -r ' select(.lastAuthAt | fromdateiso8601 <= now - 7776000).uuid' | xargs -iUSER op suspend USER

After suspending all the users for a few days (waiting to see if people complain), this command can be used to purge those users and free up their licenses.

op list users | jq -r '.[] | select(.state=="S") | .uuid' | xargs -iUSER op delete user USER

Written by: Jake

Tagged as: , , .

Rate it
Previous post

Similar posts