<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Damian Sztankowski on Medium]]></title>
        <description><![CDATA[Stories by Damian Sztankowski on Medium]]></description>
        <link>https://medium.com/@damiansztankowski?source=rss-614d11a8fe5a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*vAZNSmPvO-EdYOMWBFXGsA.jpeg</url>
            <title>Stories by Damian Sztankowski on Medium</title>
            <link>https://medium.com/@damiansztankowski?source=rss-614d11a8fe5a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 07:27:54 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@damiansztankowski/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Fixing the Identity Asymmetry: Constructing a Workspace JIT Portal with Antigravity 2.0,]]></title>
            <link>https://medium.com/google-cloud/fixing-the-identity-asymmetry-constructing-a-workspace-jit-portal-with-antigravity-2-0-8dfc1642a211?source=rss-614d11a8fe5a------2</link>
            <guid isPermaLink="false">https://medium.com/p/8dfc1642a211</guid>
            <category><![CDATA[cloud-security]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[google-antigravity]]></category>
            <dc:creator><![CDATA[Damian Sztankowski]]></dc:creator>
            <pubDate>Sun, 21 Jun 2026 09:30:14 GMT</pubDate>
            <atom:updated>2026-06-22T12:48:48.186Z</atom:updated>
            <content:encoded><![CDATA[<h3>Fixing the Identity Asymmetry: Constructing a Workspace JIT Portal with Antigravity 2.0, Gemini 3.5 Flash and Antigravity IDE</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cZg3D-ZYKe1IuvSNLcB7Wg.png" /></figure><h3>The Beginning</h3><p>Some time ago, I’ve engineered an access management architecture utilizing Okta, Google Workspace, Terraform, and Google Cloud Privileged Access Manager (PAM) to to mitigate standing privileges. Standing privileges had long been a nightmare of mine as an Organization Administrator in Google Cloud. The solution was successfully implemented, configured, and remains actively used nowadays.</p><p>At the time, I didn’t realize that by solving this, I was simply shifting the bottleneck from one area to another. The epiphany only hit me later while I was preparing a community presentation on modern Access Management strategies for Google Cloud.</p><p>So, what is the real issue here?</p><h3>The Problem</h3><p>You can successfully mitigate standing privileges on the Google Cloud side by leveraging PAM and following a strict Just-In-Time (JIT) workflow. As long as you use a third-party identity tool capable of dynamically managing time-based memberships for Google Workspace Groups, the workflow remains clean.</p><p>The problem arises when you want to avoid third-party platforms like Okta or Okta Workflows entirely and rely purely on Google Workspace as your native Identity Provider (IdP). Because Google Workspace lacks a built-in JIT scheduling mechanism, assigning a user to a group means they effectively retain permanent (“infinite”) access to request the underlying entitlements configured via PAM.</p><h3>The Remediation</h3><p>Okay, but how can this be mitigated?</p><p>That’s what I was asking myself too, especially because Google Workspace lacks a native, self-service JIT role elevation mechanism. The answer was obvious:<strong> I had to build something on my own and share it with the community.</strong></p><p>To bring this project to life, I’ve decided to use <strong>Antigravity 2.0</strong>, <strong>Antigravity IDE</strong>, and <strong>WSL (Windows Subsystem for Linux)</strong>.</p><h3>The Helper</h3><p>I probably don’t need to introduce the Antigravity universe to this audience. However, if you aren’t familiar with its agentic capabilities yet, you can explore the fundamentals in their documentation. To tackle this project efficiently, I configured my development environment with a highly tailored, streamlined setup.</p><h4>WSL</h4><p>For my day job, I live on macOS ❤️. However, for my private community work and GDE projects, I do everything on Windows via WSL (Ubuntu 24.04 paired with a clean, colorized terminal). My setup here is intentionally minimalist — no complex tmux configurations or heavy custom dotfiles. I also avoided exposing my entire WSL root directly to Antigravity, opting instead for a dedicated project directory.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-gz08mfeHdjpPHbs-yMq9A.png" /></figure><h4>Antigravity 2.0</h4><p>I prefer isolating projects into distinct environments, so the new “Project-centric” model introduced in Antigravity 2.0 resonates perfectly with me. For those unfamiliar with how Projects work in the new architecture:</p><blockquote>“A Project is a configuration of folders defining the environment and the scope of your agent. Instead of forcing an agent to operate within a single folder, a project can work with one folder or multiple folders (e.g., a frontend and a backend repo), providing your agents with all of the context required for your codebase. All projects have their own isolated agent settings, allowing you to customize different projects’ security settings independently.”</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/249/1*ReF-_GWySI_N5cLFyniCVA.png" /></figure><p>Because this platform was bound to grow complex — spanning web backend development, UI states, and strict security constraints — I enabled the new <strong>Worktree Mode</strong> for my agent interactions. According to the documentation:</p><blockquote>New Worktree Mode: Creates a new Git worktree for the conversation. (Best for complex tasks, keeping your active working folder untouched and preventing parallel subagents from conflicting).</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/790/1*OdapRmkMHLoLlCnP57CMAQ.png" /></figure><p>This isolation introduced one minor operational challenge: because the agent’s workspace was sandbox-isolated by default, I couldn’t easily verify runtime changes inside my active WSL directory. To smooth out this friction, I instructed the agent to automatically update my primary WSL project directory upon the successful completion of each task. After applying the corresponding file permissions to that directory, the agent was able to sync and manage files autonomously.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1023/1*TnKT8D7GtdnSwS9Vl6LSMA.png" /></figure><p>To boost development velocity, I pre-approved a list of standard terminal commands that I knew well. This eliminated the constant, tedious prompt confirmations that typically slow down agent execution.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/757/1*EsaFBP4vlwCiDyCiTIIbQg.png" /></figure><p>Additionally, because I design my solutions to be fully containerized from day one, I chose Cloud Run as my deployment target. To streamline this, I installed the Cloud Run MCP (Model Context Protocol) server. Being able to inspect logs and monitor deployment states directly via MCP proved to be immensely faster than copy-pasting outputs back and forth from Logs Explorer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/734/1*dy_ib_UsFUfFKrUN1rBaBA.png" /></figure><p>Finally, for the brain of the operation, I utilized <strong>Gemini 3.5 Flash (Medium reasoning tier)</strong>. It remains my default choice for executing rapid, context-aware development cycles across all my AI-driven projects.</p><h3>Antigravity IDE</h3><p>For my daily coding, I use VS Code with a library of extensions. However, when there is a dedicated IDE built for a product, I prefer to use it. The new Antigravity IDE has to be downloaded separately now, which keeps the core agent package lightweight.</p><p>Inside the Antigravity IDE, I installed a few essential extensions:</p><ul><li>WSL Reveal Folder</li><li>Open Remote WSL</li><li>Docker</li><li>markdownlint</li></ul><p>I relied on the IDE primarily for running the application locally, verifying UI renders, and making small, quick manual tweaks. The heavy-lifting code generation was left entirely to Antigravity.</p><h3>The Solution</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Pg7XkfLLFLj5zCOZ6axGWA.png" /></figure><p>Google Workspace permissions are ultimately resolved via group memberships. If you are in the gws-super-admins@company.com group, you get those privileges. If you are removed, your access is revoked.</p><p>The JIT portal acts as an orchestrator. Instead of assigning standing privileges, I assign users to JIT Policies mapped to specific Workspace groups.</p><pre>                                  +-----------------------+<br>                                  |    Target Workspace   |<br>                                  |    Directory Group    |<br>                                  +-----------------------+<br>                                              ^<br>                                              | [ Provisions/Revokes JIT Member ]<br>+-------------------------+       +-----------------------+<br>|  Vite React Frontend    | &lt;---&gt; |   Express REST API    |<br>|  (Self-Service Request) |       |   (Node.js Engine)    |<br>+-------------------------+       +-----------------------+<br>                                              |<br>                                              v [ Dispatches JSON Alerts ]<br>                                  +-----------------------+<br>                                  | Slack / Teams Webhook |<br>                                  +-----------------------+</pre><p>Here’s the basic user flow:</p><ol><li><strong>Request:</strong> A user logs in, selects the administrative role they need, provides a business justification, and chooses a duration (e.g., 30 minutes, 1 hour).</li><li><strong>Approve:</strong> A peer administrator receives a notification, reviews the justification, and approves or denies the request. Requesters cannot approve their own requests (enforcing strict dual-custody).</li><li><strong>Provision:</strong> The backend adds the user to the target Google Workspace group.</li><li><strong>Revoke:</strong> A background scheduler constantly monitors active sessions. The second the clock runs out, the engine automatically removes the user from the group.</li></ol><h3>Four Engineering Challenges We Faced (And Solved)</h3><p>Building a simple web app is easy. Building an enterprise-grade security tool that handles your primary identity provider is a completely different ballgame. Here are the major hurdles we had to overcome.</p><h3>1. The “Super Admin credentials” Trap</h3><p>To add or remove users from Workspace groups, the portal needs administrative permissions. Traditionally, people solve this by creating a Google Cloud Service Account, downloading a JSON key, and granting it Domain-Wide Delegation (DWD) to act as a Super Admin.</p><p><strong>This is a massive risk.</strong> If that service account key is leaked, the attacker has immediate, unrestricted access to your entire Google Workspace domain.</p><p>To mitigate this, I implemented two critical security architectural features:</p><ul><li><strong>Custom Admin Roles:</strong> I documented a path to restrict DWD. Instead of delegating Super Admin rights, I delegate access to a <em>Custom Admin Role</em> that only has “Group Write” and “Member Write” permissions on specific, designated JIT groups.</li><li><strong>Keyless Authentication (Workload Identity Federation):</strong> I eliminated static JSON keys entirely for Cloud Run deployments. The portal runs under an ambient Google Cloud Service Account. It authenticates keylessly, calling Google’s IAM Credentials API remotely to sign JWT assertions and exchange them dynamically for temporary Workspace OAuth2 tokens. No static secrets to leak, ever.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/739/1*XKB78bDaJq6kqyeyZgHvvA.png" /></figure><h3>2. Multi-Tenancy and “Spaces”</h3><p>In large organizations, a single global JIT policy doesn’t work. Different business units, regions, or clients (in MSP scenarios) need their own segregated environments.</p><p>I built <strong>Spaces (Multi-Tenant Configs)</strong>. Under the hood, administrators can define isolated “Spaces” with:</p><ul><li>Dedicated Workspace JIT policies.</li><li>Space-specific Service Accounts and Delegated Operators.</li><li>Space-specific Slack or Microsoft Teams webhooks.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/769/1*6u7d1ZaqMw2gX5C1QmgLvQ.png" /></figure><p>This allows a central infrastructure team to run a single portal deployment while delegating access control to different engineering or operations teams.</p><pre>+-------------------------------------------------------------+<br>| PORTAL INSTANCE                                             |<br>|   ├── Global Config (Shared system defaults)                 |<br>|   ├── Space A (Tenant: Finance - Slack Channel #finance-alerts) |<br>|   └── Space B (Tenant: Security - Slack Channel #soc-alerts)    |<br>+-------------------------------------------------------------+</pre><h3>3. Fighting Out-of-Band Group Memberships (Orphaned Access)</h3><p>What happens if someone bypasses the JIT portal entirely? If a rogue admin (or an attacker) goes straight into the Google Admin Console and manually adds an account to a protected group, the portal’s database wouldn’t know about it. The user would retain permanent access.</p><p>I solved this by implementing <strong>Access Reviews &amp; Attestation</strong>.</p><p>Every JIT policy now has a certification cycle. When an auditor or administrator attests to a policy:</p><ol><li>The backend triggers a live query directly to the <strong>Google Directory API</strong> to fetch the current, actual membership list of the group.</li><li>It compares the actual memberships against the portal’s active, approved DB sessions.</li><li>If it finds anyone in the group who does <em>not</em> have an active JIT session, it flags them as <strong>“Orphaned Access”</strong>.</li><li>The system immediately locks down, writes a critical security audit log, and dispatches a high-priority warning message to the Slack/Teams webhook so security teams can investigate.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/736/1*-zgo_XeKeEnS8b9_pqW7Jg.png" /></figure><h3>4. Transitioning to Dynamic ABAC (Attribute-Based Access Control)</h3><p>Initially, the codebase had hardcoded boolean flags to restrict JIT requests (e.g., requiring a user to be oncall, or in security). This was too rigid.</p><p>I refactored the permission engine into a dynamic, tag-based <strong>ABAC system</strong>. Administrators can now define arbitrary system-wide tags (e.g., EMEA-OnCall, SIRT-Member, DB-Admin).</p><ul><li>Users are assigned these tags in their profiles.</li><li>Groups require a subset of these tags to allow request submissions. The backend performs set-intersection checks on request submission, allowing for infinitely customizable access rules.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/730/1*1KSKSEA_Q6BCWpxJNB_JoQ.png" /></figure><h3>Consolidating Notifications</h3><p>To minimize external points of failure (and simplify deployment), I completely removed legacy email/SMTP alerts, moving to an <strong>exclusively Webhook-based integration model</strong>. Requesters, approvers, and security teams get notifications via Slack or MS Teams. I also built a <strong>“Test Webhook”</strong> utility right in the settings UI so operators can verify connectivity instantly with a single click before deploying policies.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/727/1*WXYQCDZFWyc9R8Wk9s14Qw.png" /></figure><h3>Summary and last word</h3><p>Building the Google Workspace JIT Access Portal was a journey in solving the “Identity Asymmetry” between cloud-level JIT (via Google Cloud PAM) and identity-level group memberships. By combining a Node.js Express backend and a Vite React frontend with direct Google Directory API integrations, I’ve constructed an architecture supporting:</p><ul><li><strong>Time-Bound Elevations:</strong> Automatic removal of users from administrative Google Groups once their approved window expires.</li><li><strong>Dual-Custody Approvals:</strong> Enforced peer review preventing self-approvals.</li><li><strong>Keyless Security:</strong> Workload Identity Federation replacing dangerous static JSON service account keys.</li><li><strong>Continuous Attestation:</strong> Automatic detection of out-of-band or orphaned group members.</li><li><strong>Dynamic ABAC:</strong> Attribute-based guards filtering request eligibility using user profile tags.</li></ul><p>You can test this solution: <a href="https://github.com/damian-sztankowski/gws-jit">https://github.com/damian-sztankowski/gws-jit</a></p><p><strong>To be absolutely clear:</strong></p><p><em>My goal here wasn’t to replace enterprise-grade identity governance tools (like Okta or Saviynt) if you already have them in place. Instead, I wanted to create a free, lightweight, open-source alternative for organizations and engineering teams that want to run natively on Google Workspace and GCP without the overhead or license costs of external enterprise tools and let them decide.</em></p><p>Do not forget the 👏✌️❤️ if you like this content!</p><p>You can also follow me on <a href="https://www.linkedin.com/in/damian-sztankowski-95878b2a8/"><strong>LinkedIn</strong></a><strong> </strong>or<strong> </strong><a href="https://github.com/damian-sztankowski"><strong>Github</strong></a><strong>.</strong></p><p>Thank you!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8dfc1642a211" width="1" height="1" alt=""><hr><p><a href="https://medium.com/google-cloud/fixing-the-identity-asymmetry-constructing-a-workspace-jit-portal-with-antigravity-2-0-8dfc1642a211">Fixing the Identity Asymmetry: Constructing a Workspace JIT Portal with Antigravity 2.0,</a> was originally published in <a href="https://medium.com/google-cloud">Google Cloud - Community</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Beyond the GDE Badge: It’s Not the “How.” It’s the “Why?”]]></title>
            <link>https://damiansztankowski.medium.com/beyond-the-gde-badge-its-not-the-how-it-s-the-why-fad92dcdab38?source=rss-614d11a8fe5a------2</link>
            <guid isPermaLink="false">https://medium.com/p/fad92dcdab38</guid>
            <category><![CDATA[career-advice]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[google-developer-expert]]></category>
            <dc:creator><![CDATA[Damian Sztankowski]]></dc:creator>
            <pubDate>Thu, 07 May 2026 18:02:07 GMT</pubDate>
            <atom:updated>2026-05-07T18:21:47.408Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mNUJ7h1ZoWWX6GQOHVJC0w.jpeg" /></figure><p>My name is Damian, and I am a Google Cloud <a href="https://developers.google.com/community/experts">GDE</a>.</p><p>A few weeks ago, I was doing daily routine with <a href="https://discuss.google.dev/"><strong>Google Developer Forum</strong></a> and one <a href="https://discuss.google.dev/t/need-a-guidance/350345">question</a> got my attention. It was a question from Abdul, a recent B-Tech graduate. He was eager, ambitious, and looking for a roadmap to become GDE.</p><blockquote>hello ;</blockquote><blockquote>abdul here, just graduated b-tech, if you dont mind can you share with me how become a GDE in cloud ,AI.</blockquote><p><strong><em>Original discussion:</em></strong><em> </em><a href="https://discuss.google.dev/t/need-a-guidance/350345"><em>https://discuss.google.dev/t/need-a-guidance/350345</em></a></p><p>I’ve seen this question many times. I’ve heard this question many times. Usually, people respond by pointing to the official documentation. They show the “checklist” of what a Google Developer Expert <strong>should</strong> look like:</p><ul><li><strong>Solid Expertise:</strong> Deep knowledge in Google technology (Cloud, AI, Android, etc.).</li><li><strong>Community Impact:</strong> Speaking, blogging, mentoring, or open-source contributions.</li><li><strong>Clear Articulation:</strong> The ability to explain complex things simply.</li><li><strong>The Basics:</strong> Being 18+ and fluent in English.</li></ul><p>As I sat down to reply, I realised that the <strong>“how”</strong> is actually a one side of this coin. The real secret — the one the data doesn’t always show — is the <strong>“Why.”</strong></p><h3>The Spark: Why we are doing what we are doing?</h3><blockquote><strong>Being a GDE is not a title; it is a mindset.</strong></blockquote><p>At least for me.</p><p>You don’t become a Google Developer Expert, an AWS Hero, or a Microsoft MVP because you want to update your LinkedIn banner or get fancy T-shirt (even tho they are super cool ;)</p><p><strong>You do it because you have a “spark” inside you.</strong></p><p>That spark is a unique blend of curiosity and empathy. It’s what drives you to spend six hours debugging an IAM policy, fine-tuning a Vertex AI model, not because a boss told you to, but because you <em>need</em> to know how it works.</p><p>And you know what? Here is the secret behind that: <strong>The spark doesn’t end when you solve the problem.</strong></p><p>The spark leads you to take that solution and hand it to the person standing behind you. That spark pushing you to help others. In the world of GDEs, we don’t hoard knowledge. We distribute it. In various of different ways. And that’s awesome.</p><h3>The Myth of the “Grand Gesture”</h3><p>If you are a student like Abdul, you might think you aren’t <strong>“expert enough”</strong> to contribute <strong>(Imposter Syndrome)</strong>. You might think you need to build the next LangChain or contribute to the Linux kernel to be noticed.</p><p><strong>This is the biggest mistake you can make.</strong></p><p>Expertise is built in the trenches of the <strong>“small” </strong>things<strong>. </strong>Some of the most impactful GDEs I know aren’t the ones writing 500-page books. They are the ones:</p><ul><li><strong>Simplifying the Complex:</strong> Writing a 200-word post that makes a terrifying Cloud Run error message understandable.</li><li><strong>The Forum Fixers:</strong> Answering a “newbie” question on a Friday night because they remember how it felt to be stuck.</li><li><strong>The Library Enhancers:</strong> Adding one line of documentation to a GitHub repo that saves a thousand developers ten minutes of work.</li></ul><p>These are the <strong>“small but meaningful”</strong> things that build a spirit. When you do these things, you aren’t just <strong>“participating” </strong>— you are leading.</p><h3>Find out Your Own Way</h3><blockquote><strong>One of the most beautiful things about the GDE program is its diversity.</strong></blockquote><p>Some of us are <strong>Builders</strong>. We live in the terminal, enhancing libraries and pushing code. Some of us are <strong>Educators</strong>. We teach cloud basics with humor and energy, making the cloud feel less like a storm and more like a tool. Some of us are <strong>Visionaries</strong>. We play with the boundaries of AI, showing the world what happens when you combine Gemini with creative art or “vibe coding.”</p><p>We all do different things. But we are all fueled by that same desire: <strong>to make the tech world a little more understandable for the person standing next to us.</strong></p><p>That’s so simple, isn’t?</p><p><strong>Remember: All these products</strong> which we GDEs are talking about <strong>are only as good and effective as the community that uses them.</strong></p><h3>My Advice? Stop Chasing.</h3><p>If you spend your career chasing a badge, you will likely burn out before you reach it. The requirements will change, the technology will shift, and the “checklist” will grow.</p><p>But if you find your own way to contribute — if you solve problems for others and share your journey with radical transparency — something interesting happens.</p><p>Just stop looking for the recognition. Then, <strong>the recognition start looking for you.</strong></p><p>To Abdul, and to every other developers, engineers, architects, all those people who starting their journey: <strong>Don’t chase the title</strong>. <strong>Chase the impact.</strong> <strong>Help someone toda</strong>y. That is the only roadmap you will ever need.</p><p>Cheers,</p><p><strong>Damian</strong> <em>GDE for Google Cloud</em></p><p>Do not forget the 👏✌️❤️ if you like this content!</p><p>You can also follow me on <a href="https://www.linkedin.com/in/damian-sztankowski-95878b2a8/"><strong>LinkedIn</strong></a><strong> </strong>or<strong> </strong><a href="https://github.com/damian-sztankowski"><strong>Github</strong></a><strong>.</strong></p><p>You can join our <a href="https://www.linkedin.com/groups/9824115/"><strong>Google Cloud Community Poland</strong></a> LinkedIn group. It’s open!</p><p>Thank you!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fad92dcdab38" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Google Cloud Heroes #1: Why PAM alone isn’t enough to save your IAM?]]></title>
            <link>https://medium.com/google-cloud/google-cloud-heroes-1-why-pam-alone-isnt-enough-to-save-your-iam-975836f764da?source=rss-614d11a8fe5a------2</link>
            <guid isPermaLink="false">https://medium.com/p/975836f764da</guid>
            <category><![CDATA[access-management]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[google-cloud-security]]></category>
            <category><![CDATA[google-cloud-iam]]></category>
            <category><![CDATA[gcp-security-operations]]></category>
            <dc:creator><![CDATA[Damian Sztankowski]]></dc:creator>
            <pubDate>Mon, 06 Apr 2026 03:48:33 GMT</pubDate>
            <atom:updated>2026-04-06T03:48:33.703Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L3BDnC8O38B2GwYZujEkhQ.png" /></figure><h3>A deadly duo: Standing privileges and Least Privilege.</h3><p>I work with Google Cloud basically every day. I have handled environments of all scales — from startups built “on the knee” to huge enterprise systems. Unfortunately, I see the same disturbing trend almost everywhere. I bet it’s the same for you. I mean, we all know this scenario:</p><p><em>It’s 2:00 in the morning, there’s an incident in production, the system is down. The engineer needs break-glass admin privileges to put out the fire. He gets them, the situation is under control, but what happens to these rights? They stay on the account. For months, sometimes years.</em></p><p>Why? Because <strong>“they may still be useful</strong>” or — even worse — <strong>we are simply afraid to take them for fear that something will suddenly stop working.</strong> This is a textbook example of the <strong>standing privileges trap</strong>, which is completely <strong>contrary to the principle of Least Privilege</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1L3NZux3Qj0NggliBtVyNA.png" /></figure><h3><strong><em>“The Hero”</em></strong>: <strong>PAM (Privileged Access Manager)</strong></h3><p>What does PAM change in general? First of all, by using PAM, you can control just-in-time temporary privilege elevation for select principals, and to <a href="https://docs.cloud.google.com/iam/docs/pam-audit-entitlement-events">view audit logs</a> afterwards to find out who had access to what and when. It’s a complete departure from the ‘trust-by-default’ mess we’ve lived in for years, because we are switching from <strong><em>“Let’s give him an admin, because he’s a smart guy and he’ll probably need it.” </em></strong>to the model: <strong><em>“No one has an admin by default, but anyone with the right can get one in 30 seconds if they have a reason.” </em></strong>Okay, but how does it work ?</p><p>To get this moving, you configure an <strong><em>“Entitlement”</em></strong>. Think of it as the policy that defines the playground rules: Who can play, what toys (roles) they can use, and how long until they have to go home:</p><ul><li><strong>Eligible Principals:</strong> The specific users or groups allowed to even <em>ask</em> for access.</li><li><strong>Justification:</strong> Does the engineer need to provide a reason or a ticket number? (Hint: They should).</li><li><strong>Privileged Roles:</strong> The exact, granular roles granted temporarily. No more “Project Editor” for a simple fix.</li><li><strong>Max Duration:</strong> The hard limit for the access window.</li><li><strong>The Grant:</strong> Once requested, PAM modifies the IAM policy at the API level. After the time is up, PAM natively revokes the roles. No manual cleanup, no forgotten doors.</li></ul><p>Cool thing is that, by using PAM, you can:</p><ul><li><strong>Grant emergency access</strong></li><li><strong>Control access to sensitive resources</strong></li><li><strong>Implement granular least privilege</strong></li><li><strong>Automate privileged access approvals</strong></li><li><strong>Help secure service accounts</strong></li><li><strong>Mitigate insider threats and accidental misuse</strong></li><li><strong>Manage access for contractors and extended workforce</strong></li></ul><p>👉 <strong>Deep dive into PAM here:</strong> <a href="https://medium.com/google-cloud/setup-temporary-elevated-access-for-google-cloud-with-pam-1ed98d6098b3">Setup temporary elevated access for Google Cloud</a> or check the <a href="https://docs.cloud.google.com/iam/docs/pam-overview">Official Docs</a>.</p><h3>The Trap: “Standing Privileges 2.0”</h3><p>Alright, we know that PAM is super cool. But if we think about it a little bit deeper, we will discover, that PAM fixing standing privileges nightmare only partially. Let’s look on typical flow for PAM:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lHf5tVHBlf7uk-K0Opclsw.png" /><figcaption>Fig 3. Typical PAM flow</figcaption></figure><ol><li>As a first step, we have to create Google Workspace group. It’s mandatory, as we can either grant IAM permissions to <strong>@gmail.com domain users</strong>, OR users in <strong>domains which are configured at Google Workspace. </strong>Also, we don’t want to manage permissions for single principals.</li><li>Then, we have to add such group to IAM and assign proper permissions (<strong>roles/privilegedaccessmanager.viewer). </strong>This allows groups and users <strong>“see”</strong> entitlements.</li><li>As a next step, we have to create entitlement, add predefined IAM roles into and set GW group as entitled principal (<strong><em>in other words, we are defining which groups will be able to request access to entitlement</em></strong>).</li><li>Lastly, we have to add users to Google Workspace group.</li></ol><p>And that’s all. It sounds like a piece of cake! And actually, it is. But, as you can see, <strong>we’re assigning users to Google Workspace groups without limiting how long they’ll be there.</strong> So, we’ve gone ahead and assigned some standing privileges again! <strong>Say hi to Standing Privileges 2.0.</strong></p><p>This is a place, where we have to enhance PAM with 3rd party tool, Okta Workflows.</p><h3>The Ecosystem: Okta Workflows</h3><p>For those, who are not familiar with <a href="https://help.okta.com/wf/en-us/content/topics/workflows/learn/learn-workflows.htm">Okta Workflows</a>, this is a tool that lets you automate many business processes using a library of third-party apps and functions. By using that tool, we are able to implement JIT on the <strong>“eligibility to be eligible”</strong> layer. In other words, we are adding time-based restrictions to adding user to Google Workspace group.</p><p>That’s awesome, but how it can work? Let’s look on following diagram:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c7ePB10lKNGsP-9i9hZjfw.png" /><figcaption>Fig.4 Enhanced Access Management wih PAM and Okta (+ Okta Workflows)</figcaption></figure><h3>The “Double-JIT” Flow:</h3><ol><li><strong>Identity First:</strong> The user hits Okta SSO.</li><li><strong>Access Request:</strong> The user hits an Okta Access Request form.</li><li><strong>The “Permission to ask”:</strong> The user specifies their level (e.g., Read/Write) and how long they need to be eligible (e.g., 4 hours).</li><li><strong>The Automation:</strong> <strong>Okta Workflows</strong> kicks in. It adds the user to the specific Okta group, which then syncs to Google Workspace via <strong>SCIM</strong>.</li><li><strong>The PAM Trigger:</strong> Now, and only now, does the user “exist” in the eyes of GCP PAM. They can now request their temporary grant in the Google Cloud Console.</li><li><strong>Auto-Cleanup:</strong> Once the Okta timer expires, the Workflow triggers and pulls the user out of the group.</li></ol><p><strong>💡 Expert Nugget:</strong> SCIM sync isn’t always instant. In a <strong>“production is down”</strong> emergency, those few minutes of sync time feel like hours. Ensure your sync intervals are tuned, or account for that small <strong>“breather”</strong> in your SOPs.</p><h3>The Victory: Why we’re actually doing Double-JIT (PAM + Okta)</h3><p>Look, implementing a “Double-JIT” architecture isn’t just an excuse to play with new tech. It’s because managing identity in a modern cloud environment is usually a nightmare. We’re doing this to kill off four specific headaches that have been slowing us down.</p><ul><li><strong>Killing the “Ghost” Accounts:</strong> Let’s be honest — our IAM policies are a mess of former employees and “temporary” projects that were never actually deleted. It’s identity debt, and it’s a liability. This setup forces the environment to stay clean. If you don’t need access <strong><em>right this second</em></strong>, you don’t have it. Simple as that.</li><li><strong>Audits that don’t suck:</strong> Usually, an audit means spending three days in a spreadsheet trying to explain why <strong>“Dave”</strong> had admin rights for six months. With this, we just hand over a log. Here’s the elevation, here’s why they needed it, and here’s exactly when the system yanked it back. It turns a week-long headache into a five-minute export.</li><li><strong>The “Friday Afternoon” Scenario:</strong> If someone’s laptop gets popped at 3 PM on a Friday, we’re usually sweating. But with this, the attacker finds a whole lot of nothing. There are no standing admin rights to hijack. To move laterally, they’d have to pass MFA and trigger an Okta Access Request, which gives our SOC a massive “hey, something is wrong” signal before anything actually happens.</li><li><strong>Stopping the “Security vs. Speed” War:</strong> I’m tired of hearing that security is a bottleneck. Engineers shouldn’t have to wait days for a manual ticket to clear just to do their jobs. Now, they request it, the policy handles the approval, and they get to work. We’re finally letting the system handle the enforcement instead of relying on everyone’s memory.</li></ul><h3>Summary</h3><p>At the end of the day, using PAM and Okta this way moves us from “hoping” people follow the rules to a system where guardrails are built-in.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*soY66YlBYOgYJVgeKqLMlQ.png" /><figcaption>Security is a culture, not a tool.</figcaption></figure><p>But here is the reality: Tech is just the lock; culture is the person who remembers to close the door. <strong>Don’t build a Fort Knox architecture for a team that leaves the keys under the mat.</strong></p><h3>About the Series: Google Cloud Heroes</h3><p><strong>Google Cloud Heroes</strong> is the “Director’s Cut” of cloud architecture, curated by a <strong>Google Developer Expert (GDE)</strong> and former <strong>Senior Cloud Solution Architect</strong>. This is a series for architects who are done with “Hello World” fluff and are ready to deal with the 2:00 AM production reality.</p><p>Every post follows a battle-tested roadmap:</p><ul><li><strong>The Hero:</strong> That shiny new GCP service with a ton of potential.</li><li><strong>The Trap:</strong> The “fine print” — the architectural debt or hidden complexity the documentation conveniently skips, whether you’re at the design board or halfway through a production incident.</li><li><strong>The Ecosystem:</strong> The automation, the IdPs, and the custom logic that actually make the Hero production-ready.</li><li><strong>The Victory:</strong> The part where you sleep through the night because your architecture handles itself.</li></ul><p><strong>The Goal:</strong> To prove that “turning it on” isn’t the same as “building it right.” Real architecture is about the ecosystem, not just the service.</p><p>Do not forget the 👏✌️❤️ if you like this content!</p><p>If this saved you from a future audit headache, hit follow.</p><p>You can also follow me on <a href="https://www.linkedin.com/in/damian-sztankowski-95878b2a8/"><strong>LinkedIn</strong></a><strong> </strong>or<strong> </strong><a href="https://github.com/damian-sztankowski"><strong>Github</strong></a><strong>.</strong></p><p>You can join our <a href="https://www.linkedin.com/groups/9824115/"><strong>Google Cloud Community Poland</strong></a> LinkedIn group. It’s open!</p><p>Thank you!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=975836f764da" width="1" height="1" alt=""><hr><p><a href="https://medium.com/google-cloud/google-cloud-heroes-1-why-pam-alone-isnt-enough-to-save-your-iam-975836f764da">Google Cloud Heroes #1: Why PAM alone isn’t enough to save your IAM?</a> was originally published in <a href="https://medium.com/google-cloud">Google Cloud - Community</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Exploring the Evolution of Google’s Community Forum: A Comparison of Old and New features]]></title>
            <link>https://medium.com/google-cloud/exploring-the-evolution-of-googles-community-forum-a-comparison-of-old-and-new-features-a399e4e8a843?source=rss-614d11a8fe5a------2</link>
            <guid isPermaLink="false">https://medium.com/p/a399e4e8a843</guid>
            <category><![CDATA[google-cloud]]></category>
            <category><![CDATA[google-developer-expert]]></category>
            <category><![CDATA[community]]></category>
            <dc:creator><![CDATA[Damian Sztankowski]]></dc:creator>
            <pubDate>Wed, 23 Jul 2025 03:40:30 GMT</pubDate>
            <atom:updated>2025-07-23T03:40:30.389Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>For Google Cloud developers, the community forum has long been a vital resource — from troubleshooting code to exchanging best practices. However, as technology evolves and developer needs grow more complex, the expectations for community platforms rise as well. In this comparison, we’ll explore how the existing Google Cloud Community forum stacks up and how a potential new Google Developer Program forums could elevate collaboration and learning for everyone involved.</p><h3>Comparison</h3><p>The following graphic illustrates the critical distinctions between the existing Google Cloud Community forum and the envisioned Google Developer Program forums.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D1eAY2t4Gh9o2vQj7aVWiA.png" /><figcaption><strong>Fig. 1</strong> — Forums features comparison.</figcaption></figure><p>I’ve divided this comparison into 12 key areas to make it easier to analyze. These areas, in my opinion, represent the most crucial and visible changes. Let’s go over a few of them in more detail — the rest should be self-explanatory.</p><h4>Login method</h4><p>This refers to how users access services like the Google Developer Program forum and related tools. Currently, participation in the Google Cloud Community forum requires creating a separate account — which isn’t ideal, especially considering how many accounts we all juggle these days. <strong>With the new forum, that’s changing. </strong>Instead of yet another login, users will sign in using their existing <a href="https://developers.google.com/program"><strong>Google Developer Program (GDP)</strong></a> profile (or create new one if doesn’t exist ) which will connect them directly to the forum. This isn’t just a minor improvement; it’s a foundational move toward a more unified and streamlined Google developer ecosystem. <strong>And it’s for everyone. </strong>To be clear, when we say “developer,” we’re referring to the entire community of people who build with Google technologies — including engineers, product managers, data scientists, IT admins, operators, architects, students, and even hobbyists. If you build on or with Google platforms, the <strong>Google Developer Program</strong> is built for you.</p><p>▶️<strong><em>How to register and log in to Google Developer Program forums:</em></strong> <a href="https://discuss.google.dev/t/how-to-create-a-google-developer-program-forums-account/162"><em>https://discuss.google.dev/t/how-to-create-a-google-developer-program-forums-account/162</em></a></p><h3>Communities</h3><p>At the heart of both forums lies the concept of <strong>communities</strong>. These serve as primary organizers, helping group related topics together and keeping the forum clean and easy to navigate. In the previous forum, there were six main communities:</p><ul><li>Google Cloud</li><li>Google Workspace</li><li>AppSheet</li><li>Looker &amp; LookerStudio</li><li>Google Cloud Security Community</li><li>Learnign &amp; Certification Hub</li></ul><p>With the new forum, <strong>one community will be removed and second one will get </strong>(Google Cloud Security Community) a <strong>dedicated URL</strong>, allowing it to grow its own community independently. This separation gives it room to evolve with a more focused identity and audience.</p><p>As a result, the new forum will include the following communities:</p><ul><li>Google Cloud</li><li>Google Workspace Developers</li><li>AppSheet</li><li>Looker &amp; LookerStudio</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tu7i0xDnyyKgakGmGPpD_A.png" /><figcaption><strong>Fig. 2</strong> — New community structure.</figcaption></figure><p>▶️ <strong>Official info about Google Cloud Security Community separation:</strong> <a href="https://www.googlecloudcommunity.com/gc/News-Announcements/The-Google-Cloud-Security-Community-is-upgrading-platforms/m-p/927434#M218">https://www.googlecloudcommunity.com/gc/News-Announcements/The-Google-Cloud-Security-Community-is-upgrading-platforms/m-p/927434#M218</a></p><p>and</p><p><a href="https://www.googlecloudcommunity.com/gc/News-Announcements/The-Google-Cloud-Security-Community-is-upgrading-platforms-Part/td-p/927909">https://www.googlecloudcommunity.com/gc/News-Announcements/The-Google-Cloud-Security-Community-is-upgrading-platforms-Part/td-p/927909</a></p><h4>Trust level</h4><blockquote>“In community, trust grows with contribution — the more you give, the more you’re trusted.”</blockquote><p>Old forum relied on community ranks. In short, the Google Cloud Community used a ranking system that consists of <em>earned</em> <em>ranks</em> and <em>assigned ranks</em>. The earned ranking ladder encourages and recognizes quality contributions to the community, whereas assigned ranks sit outside the earned ranking ladder and are given based on a specific role in the community, such as a Community Manager.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/953/1*lwwQdcSUJK2OjreTy1VypA.png" /><figcaption><strong>Fig. 3</strong> — Ranking system on Google Cloud Community forum.</figcaption></figure><p>However, new forum provides totally different approach. Google Developers Program forums offers <strong>five user trust levels</strong>. Your current trust level is visible on your user page, and a summary of all trust levels within your community is presented on your dashboard.</p><ul><li><strong><em>Basic / First level on forum</em> :</strong> Achievable, <strong>when sticking around and reading a few topics to learn what our community is about.</strong> New user restrictions have been lifted; you’ve been granted all essential community abilities, such as personal messaging, flagging, wiki editing, and the ability to post multiple images and links.</li><li><strong><em>Member / Second level on forum</em>:</strong> Achievable, <strong>when participating over a period of weeks to truly join our community.</strong> You can now send invitations from your user page or individual topics, create group personal messages, and have more likes per day.</li><li><strong><em>Regular / Third level on forum</em>:</strong> Achievable <strong>when being a regular part of our community over a period of months</strong>. You’re now one of the most active readers, and a reliable contributor that makes our community great. You can now recategorize and rename topics, take advantage of more powerful spam flags, and you’ll also get lots more likes per day.</li><li><strong><em>Leader / Fourth level on forum</em></strong>: Achievable, <strong>when you are selected by staff, </strong>and you set a positive example for the rest of the community in your actions and words here. You have the ability to edit all posts, take common topic moderator actions such as pin, close, unlist, archive, split, and merge.</li></ul><h4>Global Leaderboards</h4><p>Just like the previous forum, the new one also includes <strong>scoreboard functionality</strong>. However, unlike before, the leaderboard <strong>does not include category-specific breakdowns</strong> — it only displays scores within selected timeframes (e.g., weekly, monthly, all-time). Additionally, such leaderboard is hidden, so to reachout this you have to go to <strong>your profile -&gt; summary -&gt; expand your summary and click “cheers”.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/798/1*fUBwNSRjipUMF-e9xRa3cA.png" /><figcaption><strong>Fig. 4</strong>— Leaderboards rules.</figcaption></figure><h4>Direct Messages</h4><p>If you not aware, direct message (DM) is a private communication sent to a specific individual or a group of individuals on a social media platform or other messaging service. Unlike public posts, only the sender and recipients can view the content of a direct message. Within old forum, we had option to send direct messages, regardless of the trust level ( except totally newly created accounts. Fot them, there was incubation time, so to say).</p><p>In the <strong>new Google Developer Program forum</strong>, <strong>direct messaging is no longer available</strong> to regular users — regardless of trust level. The <strong>only users</strong> with the ability to send DMs are <strong>Googlers</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*g9bUjPtQTfevtKblQI60Cg.png" /><figcaption><strong>Fig. 5 </strong>— <em>Direct Messaging (DM) feature in the old forum.</em></figcaption></figure><h4>User Groups</h4><p>This is a completely new feature. The previous <strong>Google Cloud Community</strong> did not offer any kind of user grouping functionality. In contrast, the <strong>Google Developer Program forums</strong> introduce the concept of <strong>User Groups</strong>.</p><p>By joining a group, you can contribute to and engage with specific focus areas within the forum. It’s a great way to connect with others who share your interests, collaborate more effectively, and stay updated on topics that matter to you.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9WapMnm3-j1pBX4aRqO-aw.png" /><figcaption><strong>Fig. 6</strong> — Topic / service related forum groups.</figcaption></figure><h4>Profile Macros</h4><p>Macros are a great way to speed up the response process, if you know that there are similar questions that you come across a lot. Old forum provided such feature by default. You was able to create nine macros in total, supported with HTML syntax. Unfortunately, the <strong>new forum lacks this functionality.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R0QUppRuvl7K4QIx8WcqOw.png" /><figcaption><strong>Fig. 7 </strong>— Macros</figcaption></figure><h4>Text toolbar</h4><p>The new forum brings some welcome improvements. Previously, we had to work with a somewhat clunky editor that would occasionally hang at random, making posting a bit frustrating at times.</p><p>Now, the upgraded <strong>text editor</strong> feels like a breath of fresh air. It’s more advanced, responsive, and overall much more pleasant to use. This should significantly improve the experience of writing and formatting posts — especially for those who contribute regularly. New editor provides following features:</p><ul><li><strong>Editor Options:</strong> Switch between new rich editor text and standard Markdown editor</li><li><strong>Bold:</strong> Make font bold</li><li><strong>Italics:</strong> Make font italized</li><li><strong>Links:</strong> Insert hyperlinks.</li><li><strong>Blockquote:</strong> Add content in blockquote format</li><li><strong>Images:</strong> You can add images from your device, by copy/pasting, or uploading images to your post.</li><li><strong>Emojis (Emoticons):</strong> Select from 10 categories to quickly express your feelings without having to use words</li><li><strong>Quote whole post</strong></li><li><strong>Preformatted text</strong></li><li><strong>Bulleted List:</strong> Add a bulleted list</li><li><strong>Numbered List:</strong> Add a numbered list</li><li><strong>Insert Table:</strong> Insert a table. Add contents to the table before clicking Build Table</li><li><strong>Hide Details:</strong> Highlight text to hide. Click hide details and text will now appear in as a summary</li><li><strong>Insert date/time:</strong> Add a date and time of an event and the recurrence.</li><li><strong>Blur Spoiler:</strong> Highlight the text that needs to be blurred. Users will need to click on the text to view it.</li><li><strong>AI:</strong> AI can be used to translate to English (US), proofread, generate Markdown tables and Smart dates.<br><em>source: </em><a href="https://discuss.google.dev/t/tips-and-tricks-to-make-the-most-of-the-google-developer-program-forums/154"><em>https://discuss.google.dev/t/tips-and-tricks-to-make-the-most-of-the-google-developer-program-forums/154</em></a></li></ul><h4>AI</h4><p>Last but not least. AI. I know, that these days, all of us used AI at least once. New forum brings Gemini on board, AI powered features that will create a smoother experience, help drive more engaging conversations and make life simple for users at the forum. Some of the new features include:</p><ul><li><strong>AI Helper</strong> — Having trouble creating topic titles, classification or even its content? Let Gemini help you find your way!</li><li><strong>AI Search</strong> — Let Gemini help you quickly find the topics and answers you’re looking for with the AI semantic search feature.</li><li><strong>AI Related Topics</strong> — You may want to get a better understanding of a certain idea or situation you are facing. Related topics powered by AI will help you quickly find past, or present, experiences someone else has had.</li><li><strong>AI Summaries</strong> — Use Gemini to summarize the topic interactions and quickly understand what has been discussed</li></ul><h3>Summary</h3><p>As we can see, <strong>Google has flipped the table</strong> and introduced a genuinely interesting new platform. Of course, this is just the beginning — and like any community, the forum will continue to evolve over time. Whether you’re a <strong>new member</strong> or a <strong>seasoned forum veteran</strong>, there’s no doubt that these new communities will bring significant value to your developer journey.</p><p>Do not forget the 👏✌️❤️ if you like this content!</p><p>Also, I will be glad if you hit the follow button so you get notified of my new posts.</p><p>You can also follow me on <a href="https://www.linkedin.com/in/damian-sztankowski-95878b2a8/"><strong>LinkedIn</strong></a><strong> </strong>or<strong> </strong><a href="https://github.com/damian-sztankowski"><strong>Github</strong></a><strong>.</strong></p><p>You can join our <a href="https://www.linkedin.com/groups/9824115/"><strong>Google Cloud Community Poland</strong></a> LinkedIn group. It’s open!</p><p>Thank you!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a399e4e8a843" width="1" height="1" alt=""><hr><p><a href="https://medium.com/google-cloud/exploring-the-evolution-of-googles-community-forum-a-comparison-of-old-and-new-features-a399e4e8a843">Exploring the Evolution of Google’s Community Forum: A Comparison of Old and New features</a> was originally published in <a href="https://medium.com/google-cloud">Google Cloud - Community</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cloud Chronicles: Google Cloud in Action — Fix your VM in a minute]]></title>
            <link>https://medium.com/google-cloud/cloud-chronicles-google-cloud-in-action-fix-your-vm-in-a-minute-558092b75f89?source=rss-614d11a8fe5a------2</link>
            <guid isPermaLink="false">https://medium.com/p/558092b75f89</guid>
            <category><![CDATA[infrastructure-management]]></category>
            <category><![CDATA[infrastructure]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[operations]]></category>
            <dc:creator><![CDATA[Damian Sztankowski]]></dc:creator>
            <pubDate>Mon, 06 Jan 2025 02:41:42 GMT</pubDate>
            <atom:updated>2025-01-06T02:41:42.093Z</atom:updated>
            <content:encoded><![CDATA[<h3>Cloud Chronicles: Google Cloud in Action — Fix your VM in a minute</h3><h3><strong>Introduction</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Kdtu_EkhANgFY8umXN-FWg.png" /><figcaption>Source: Canva</figcaption></figure><p>I’ve been seeing an increasing number of posts recently asking for help with basic issues on Google Compute Engine (GCE). Users are encountering problems like:</p><ul><li>Incorrect SSH keys</li><li>Insufficient filesystem space</li><li>OS boot loops</li><li>Misconfigurations</li></ul><p>These issues, while common, aren’t as daunting as they might seem. Chances are, every Unix Admin has dealt with at least one of these challenges before. But what happens when these problems arise in a production environment? What if you’re not a seasoned admin with a toolkit of quick fixes for operating system issues?</p><p>If that sounds like you, this article is here to help.</p><h3><strong>Use case</strong></h3><p>Imagine a scenario where you’re managing a critical Linux server in a lift-and-shift environment. During your shift, you receive an alert about high disk space utilization. You log into the server, investigate the issue, and decide to extend the disk. After resizing the disk through the UI, you initiate a restart, expecting everything to function smoothly. However, instead of success, you’re met with an error message stating something like, <strong><em>“The VM may need additional disk space. Resize and then restart the VM…”</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LTWfibCbcwRf56lR3bJSAQ.png" /><figcaption>Fig1. Disk space error message</figcaption></figure><p>To make matters worse, the full disk prevents you from logging in via SSH. So, the question is: <strong>What do you do next?</strong></p><p><strong>Solution</strong></p><ol><li>Create similar VM, <strong>at the same region and zone as you broken one</strong>. VM must be in the same region due to disk attachment.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OEjthqiOgj92zBxBmC5ghQ.png" /><figcaption>Fig2. Broken and temp VMs</figcaption></figure><p>ℹ️ If you create VM in different region, <strong>UI will not allow you to attach broken disk.</strong></p><p>ℹ️ Do not clone VM. This will also clone UUID for broken disk, and you will be forced to generate UUID again.</p><p>I’ve intentionally filled out disk space (Fig3). That caused following error (Fig4).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/734/1*4LDRSn4HATRgRZ2BmUd3bQ.png" /><figcaption>Fig3. Full disk space</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*pT10aaJTs-Bl7c4KR9_pLw.png" /><figcaption>Fig4. Error</figcaption></figure><p>So I’ve stopped VM. Expanded BOOT disk from 10 GB to 50GB And started VM again. Still the same issue.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/681/1*qfTcXFRG65UPIM-AL6GUFw.png" /><figcaption>Fig5. Issue exist after resize from UI</figcaption></figure><p>2. Shut down your broken one, once done, detach boot disk ( or disk which is broken ).</p><p>ℹ️ The virtual machine must be completely shut down before disconnecting the boot disk.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*P8TReMFX3ZnYmydGomf54w.png" /><figcaption>Fig6. Detached boot disk</figcaption></figure><p>3. Attach disk to newly created VM.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/562/1*LH5FOfOiHa0Py9wRtsX2ig.png" /><figcaption>Fig7. Attach broken disk to clean VM</figcaption></figure><p>4. Log in to clean VM. Disk should be visible immediately. Perform <strong>fdisk -l</strong> command to list attached disks and partitions</p><pre>fdisk -l</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/851/1*XGotvRN-Z7IaWmqthhXn7g.png" /><figcaption>Fig8. Output from fdisk -l command</figcaption></figure><p>5. As root, create mountpoint named “broken” and mount device with type Linux filesystem</p><pre>mount /dev/sdX /broken</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/672/1*8v0Beqqr1EYoFR1dBLiJNQ.png" /><figcaption>Fig9. Mounted broken disk to dedicated mountpoint</figcaption></figure><p>6. As you can see, we have all files from broken VM ( now you can clean FS or do anything).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/698/1*tw8YoBPCmntWKHQesXS0lg.png" /><figcaption>Fig10. All files and filesystems structure from <strong>broken</strong> VM are available on <strong>clean</strong> one</figcaption></figure><p>7. In our case, once disk is resized by UI. You have to also resize partition / filesystem. My case presents raw partition without LVM.</p><pre>growparth DEVICE PARTITION_NUMBER &lt;- will resize PARTITION<br>resize2fs /FS &lt;- will resize filestem on that partition</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/952/1*8wGpS08pYaR54VNRr3i6dQ.png" /><figcaption>Fig11. Resizing partition and filesystem</figcaption></figure><p>8. Umount mountpoint. If you receive error “Device is busy” check if you are at mountpoint destination. If yes, type <strong>cd</strong> and hit <strong>enter. </strong>Then umount mountopoint again.</p><pre>cd <br>umount /broken</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/654/1*a5XxG3YAUUodPE3oWcaMWA.png" /><figcaption>Fig12. Umount broken mountpoint</figcaption></figure><p>9. Detach disk (Fig13). Once done, Configure new disk on broken VM. Save config and start broken VM (Fig14)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/573/1*DlhEstxDu8xDL6drcU_hGA.png" /><figcaption>Fig13. Detach broken disk from clean VM</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MaRFSnbCfibyK02WEhVfXA.png" /><figcaption>Fig14. Attach fixed disk to broken VM</figcaption></figure><p>10. Wait till VM will boot. Once done, try to log into broken VM.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/695/1*QRScwMogw0q11NUZ2870RQ.png" /><figcaption>Fig15. Verify size and VM work</figcaption></figure><h3><strong>Conclusions</strong></h3><p>This method is not just a solution for disk space issues — it’s a versatile approach that can help resolve almost any OS-related problem on your VM. By leveraging a temporary VM and detaching the affected disk, you gain full access to diagnose and fix critical issues without compromising the original VM’s configuration.</p><p>Whether it’s recovering from boot loops, addressing filesystem misconfigurations, or resolving SSH access errors, this technique ensures minimal downtime and prevents unnecessary data loss. With these steps in your toolkit, even complex problems in a production environment become manageable.</p><p>By staying proactive and mastering these strategies, you can handle unexpected challenges with confidence, ensuring the stability and reliability of your cloud infrastructure.</p><p>Do not forget the 👏✌️❤️ if you like this content!</p><p>Also, I will be glad if you hit the follow button so you get notified of my new posts.</p><p>You can also follow me on <a href="https://www.linkedin.com/in/damian-sztankowski-95878b2a8/"><strong>LinkedIn</strong></a><strong> </strong>or<strong> </strong><a href="https://github.com/damian-sztankowski"><strong>Github</strong></a><strong>.</strong></p><p>You can join our <a href="https://www.linkedin.com/groups/9824115/"><strong>Google Cloud Community Poland</strong></a> LinkedIn group. It’s open!</p><p>Thank you!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=558092b75f89" width="1" height="1" alt=""><hr><p><a href="https://medium.com/google-cloud/cloud-chronicles-google-cloud-in-action-fix-your-vm-in-a-minute-558092b75f89">Cloud Chronicles: Google Cloud in Action — Fix your VM in a minute</a> was originally published in <a href="https://medium.com/google-cloud">Google Cloud - Community</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From Chaos to Clarity: Mastering Alerting Policy Documentation]]></title>
            <link>https://medium.com/google-cloud/from-chaos-to-clarity-mastering-alerting-policy-documentation-2b646ff2bc8b?source=rss-614d11a8fe5a------2</link>
            <guid isPermaLink="false">https://medium.com/p/2b646ff2bc8b</guid>
            <category><![CDATA[infrastructure]]></category>
            <category><![CDATA[gcp-security-operations]]></category>
            <category><![CDATA[best-practices]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[monitoring]]></category>
            <dc:creator><![CDATA[Damian Sztankowski]]></dc:creator>
            <pubDate>Mon, 11 Nov 2024 02:08:34 GMT</pubDate>
            <atom:updated>2024-11-11T02:08:34.368Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yBJPZDbK3mtKPLvXBKUtww.png" /></figure><p>In today’s fast-moving, cloud-based world, robust alarm systems are non-negotiable. While the focus is on setting thresholds, defining conditions and configuring alert channels, one critical aspect is often overlooked <strong>-documentation</strong>. Without clear and practical documentation of alert policies, even the most sophisticated alerting system can fall into chaos.</p><p>This article explains why alert policy documentation is essential, what makes it effective and provides a practical guide to creating it.</p><h3>Why we should care about Alerting Policy Documentation?</h3><p>Imagine a situation where you are on call and at 3 a.m. you receive an alert from the production department stating <em>“Memory usage exceeds threshold</em> ’ or the title of the incident is so long that it is completely unreadable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DPNl5S3ROEcO-nPFxqgekA.png" /><figcaption>Figure 1. Incident title example received from Operations</figcaption></figure><p>What could be the reason for this? You have to search for runbooks, check the message payload or dig directly from the project to get the necessary information. This creates a gap and takes a very long time, exposing customers to potential downtime.</p><p>However, good documentation bridges this gap. It enables teams to respond effectively, reduces downtime and minimises confusion during incidents. It’s not just best practice — it’s a survival tool.</p><h3>Key Elements of Effective Alerting Documentation</h3><p>To move from chaos to clarity, your alerting documentation should include the following:</p><p>➡️ Your policy documentation, does not have to contain all of following points. However, the more detailed the information contained in this section, the better for the on-call engineer.</p><h4>1. Purpose of the Alert</h4><ul><li>Why does this alert exist?</li><li>What specific behavior or threshold is it monitoring?</li></ul><pre>Example: &quot;This alert monitors CPU usage on production servers to prevent performance degradation.&quot;</pre><h4>2. Trigger Conditions</h4><ul><li>What conditions must be met to fire this alert?</li><li>Include metrics, thresholds, and time periods.</li></ul><pre>Example: &quot;CPU usage exceeds 85% for 5 minutes.&quot;</pre><h4>3. Severity and Impact</h4><ul><li>How critical is this alert?</li><li>Use categories like “High,” “Medium,” or “Low” and explain their meaning.</li></ul><pre>Example: &quot;High severity: This alert indicates potential server overload, affecting end-user experience.&quot;</pre><p>➡️ It’s always good to add such information if possible, to speedup proritisation of incidents.</p><h4>4. Escalation Path</h4><ul><li>Who is responsible for responding?</li><li>Include on-call schedules, escalation policies, and backup contacts.</li></ul><pre>Example: &quot;Notify the primary on-call engineer via PagerDuty. Escalate to the SRE lead if unresolved within 30 minutes.&quot;</pre><h4>5. Actionable Steps</h4><ul><li>What should responders do upon receiving this alert?</li><li>Provide clear instructions, relevant playbooks, or troubleshooting guides.</li></ul><pre>Example: &quot;Step 1: SSH into the affected server. Step 2: Check running processes. Step 3: Restart the application if necessary.&quot;</pre><p>➡️ Here you should provide a link to runbook if more steps are required.</p><h4>6. Related Resources</h4><ul><li>Include links to dashboards, logs, or other tools.</li><li>Mention dependencies or related services.</li></ul><pre>Example: &quot;Check the CPU Usage dashboard in Google Cloud Monitoring.&quot;</pre><h4>7. Owner and Updates</h4><ul><li>Who owns this alert policy?</li><li>Include a review schedule to ensure documentation stays up to date.</li></ul><pre>Example: &quot;Owned by the SRE team. Reviewed quarterly.&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/594/1*hp7BD9i7iGIH06ZhAsQFtQ.png" /><figcaption>Figure 2. Example of good policy documentation</figcaption></figure><h3>Steps to create Alerting Policy Documentation</h3><p>Alerting policy documentation includes three main components: a title, descriptive content, and relevant links. You can define this documentation through the Google Cloud Console, the Cloud Monitoring API, or the Google Cloud CLI.</p><h4>Styling:</h4><p><strong>Markdown formatting</strong> can be used to enhance your documentation, but only a specific subset of Markdown syntax is supported:</p><ul><li><strong>Headings</strong>: Created with one or more hash symbols at the beginning of the line.</li><li><strong>Bullet Points</strong>: Represented by starting lines with plus signs (+), minus signs (-), or asterisks (*).</li><li><strong>Numbered Lists</strong>: Begin lines with a number followed by a period.</li><li><strong>Italicized Text</strong>: Surround words or phrases with a single asterisk (*) or underscore (_).</li><li><strong>Bold Text</strong>: Enclose text within double asterisks (**) or underscores (__).</li><li><strong>Hyperlinks</strong>: Use the [link text](URL) format. However, it is recommended to use the <a href="https://cloud.google.com/monitoring/alerts/doc-variables?hl=en#add-links">Link</a> object to configure URLs within your documentation.</li></ul><p>➡️ If you need more info about markdowns, this site is for your:</p><p><a href="https://markdownguide.offshoot.io/basic-syntax/">Basic Syntax | Markdown Guide</a></p><h4>Variables:</h4><p>Alerting policy documentation allows you to use <a href="https://cloud.google.com/monitoring/alerts/doc-variables?hl=en#doc-vars">variables</a> like in example condition.name or metrix.display_name.With that you can customize the text in your documentation and dynamically obtain values from corresponding Google Cloud resources.</p><blockquote>For example, ${resource.label.zone} is replaced with the value of the zone label. The values of these variables are subject to grouping; see <a href="https://cloud.google.com/monitoring/alerts/doc-variables?hl=en#null-values">null values</a> for more information.</blockquote><blockquote>To retrieve the value of the project_id label on a monitored resource in the alerting policy, use ${resource.project}.</blockquote><blockquote>You can&#39;t access user-defined resource metadata labels by using resource.label.KEY. Use metadata.user_label.KEY instead.</blockquote><blockquote><a href="https://cloud.google.com/monitoring/alerts/doc-variables?hl=en#google-cloud-console">https://cloud.google.com/monitoring/alerts/doc-variables?hl=en#google-cloud-console</a></blockquote><p><strong>Important:</strong></p><blockquote>Only the variables in the table are supported. You can’t combine them into more complex expressions, like ${varname1 + varname2}.</blockquote><blockquote>These variables are replaced by their values only in notifications sent through notification channels. In the Google Cloud console, when the documentation is shown, you see the variables, not the values. Examples in the console include the descriptions of incidents and the preview of the documentation when creating an alerting policy.</blockquote><blockquote><a href="https://cloud.google.com/monitoring/alerts/doc-variables?hl=en#usage_notes">https://cloud.google.com/monitoring/alerts/doc-variables?hl=en#usage_notes</a></blockquote><h4>Null values</h4><p>Sometimes, variable can show null<em> </em>value. It is because of variables are derived from time series. Their values can be null if no values are returned from the time series query.</p><p>➡️ More info here: <a href="https://cloud.google.com/monitoring/alerts/doc-variables?hl=en#null-values">https://cloud.google.com/monitoring/alerts/doc-variables?hl=en#null-values</a></p><h3>Conclusion</h3><p>Clear and concise documentation of alerting policies, transforms chaotic incidents into manageable events. By considering the purpose, severity, actionable steps and dynamic variables, you can enable your team to respond with clarity and confidence. Take the time to regularly review and refine your alert policies — it’s a small investment that pays huge dividends.<br>What is your approach to documenting alerts? Share your tips and experiences in the comments below!</p><p>Do not forget the 👏✌️❤️ if you like this content!</p><p>Also, I will be glad if you hit the follow button so you get notified of my new posts.</p><p>You can also follow me on <a href="https://www.linkedin.com/in/damian-sztankowski-95878b2a8/"><strong>LinkedIn</strong></a><strong> </strong>or<strong> </strong><a href="https://github.com/damian-sztankowski"><strong>Github</strong></a><strong>.</strong></p><p>You can join our <a href="https://www.linkedin.com/groups/9824115/"><strong>Google Cloud Community Poland</strong></a> LinkedIn group. It’s open!</p><p>Thank you!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2b646ff2bc8b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/google-cloud/from-chaos-to-clarity-mastering-alerting-policy-documentation-2b646ff2bc8b">From Chaos to Clarity: Mastering Alerting Policy Documentation</a> was originally published in <a href="https://medium.com/google-cloud">Google Cloud - Community</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Unleashing Secure DevOps: Empowering Policy Enforcement in Infrastructure-as-Code]]></title>
            <link>https://medium.com/google-cloud/unleashing-secure-devops-empowering-policy-enforcement-in-infrastructure-as-code-61f7d49ed5f6?source=rss-614d11a8fe5a------2</link>
            <guid isPermaLink="false">https://medium.com/p/61f7d49ed5f6</guid>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[terraform]]></category>
            <category><![CDATA[iaac]]></category>
            <category><![CDATA[ci-cd-pipeline]]></category>
            <category><![CDATA[github-actions]]></category>
            <dc:creator><![CDATA[Damian Sztankowski]]></dc:creator>
            <pubDate>Wed, 14 Aug 2024 06:28:52 GMT</pubDate>
            <atom:updated>2024-08-14T06:28:52.404Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xNNRVBkONjDy_14ID6BlKA.gif" /></figure><h3>World of IaaC</h3><p>In the ever-evolving landscape of cloud computing, managing infrastructure efficiently and consistently is paramount. This is where Infrastructure as Code (IaaC) comes into play. IaaC is a method of managing and provisioning IT infrastructure through machine-readable scripts, rather than through manual processes or graphical interfaces. By codifying your infrastructure, IaC enables automated, repeatable, and consistent deployments.</p><p><strong>Terraform</strong> is a powerful tool that embodies the principles of IaC. Developed by HashiCorp, Terraform allows you to define both cloud and on-premises resources using a declarative configuration language. This means you can describe your desired infrastructure state in configuration files, and Terraform will handle the provisioning, updating, and management of these resources according to your specifications. Its support for a wide array of cloud providers and services makes it a versatile choice for modern infrastructure management.</p><p>By leveraging Terraform with Google Cloud, organizations can streamline their infrastructure workflows, enhance consistency, and foster a more agile and responsive IT environment.</p><p><strong>Challenges of Infrastructure as a Code (IaaC)</strong></p><p>While Infrastructure as a Code (IaaC) brings numerous benefits to infrastructure management, including automation, consistency, and scalability, it also introduces its own set of challenges and considerations. Understanding these potential pitfalls is crucial for effectively leveraging IaaC tools like Terraform.</p><p><strong>Configuration error</strong>s is one of those concerns. As infrastructure evolves, errors can stem from various sources, including syntax mistakes, incorrect resource definitions, or overlooked dependencies. They can lead to deployment failures, misconfigured resources, or even security vulnerabilities if not properly managed.</p><p><strong>How to secure your infrastructure then?</strong></p><p><strong>Terraform Constraints</strong>: Addressing these challenges involves understanding and utilizing Terraform constraints effectively. Terraform provides mechanisms such as modules, providers, and workspace management to help address complexity, dependency management, and state consistency. By leveraging these features, you can better manage your infrastructure code, improve collaboration, and enhance the overall stability and security of your deployments.</p><h3>Policy Validation aka Terraform Constraints</h3><p>In the context of Infrastructure as Code (IaC) and Terraform, organizational constraints refer to the policies, standards, and limitations imposed by an organization to ensure that infrastructure management aligns with corporate requirements and best practices. These constraints help maintain consistency, security, compliance, and operational efficiency across infrastructure deployments.</p><p>Based on that, to keep your IaaC code consistent with policies, Google provided tool called <strong>gcloud beta terraform vet.</strong></p><blockquote><a href="https://cloud.google.com/sdk/gcloud/reference/beta/terraform/vet">gcloud beta terraform vet</a> is a tool for enforcing policy compliance as part of an infrastructure CI/CD pipeline. When you run this tool, gcloud beta terraform vet retrieves project data with Google Cloud APIs that are necessary for accurate validation of your plan.</blockquote><blockquote>Source: <a href="https://cloud.google.com/docs/terraform/policy-validation">https://cloud.google.com/docs/terraform/policy-validation</a></blockquote><p>With this tool you can:</p><ul><li>Enforce policy at any stage of deployment</li><li>Remove errors by policy validation</li></ul><h3>Policy Validation usage</h3><p>Following demo present terraform vet example. I will also provide entire CICD configuration for further work.</p><h4>Prerequisites</h4><p>Before you will start working with Policy Validation, you must prepare following things:</p><ol><li>Create Google Cloud Project : <a href="https://developers.google.com/workspace/guides/create-project">https://developers.google.com/workspace/guides/create-project</a></li><li>Assign following permissions for that project : <a href="https://cloud.google.com/iam/docs/grant-role-console">https://cloud.google.com/iam/docs/grant-role-console</a></li></ol><ul><li>resourcemanager.projects.getIamPolicy – This permission can be granted with the Security Reviewer role for the organization.</li><li>resourcemanager.projects.get – This permission can be granted with the Project Viewer role for the organization.</li></ul><p>Once done, you can move forward.</p><h4>Prepare and use constraints</h4><ol><li>Log in to you project and enable CloudShell</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oQH2vGA-b0GRtZYiA--3Bg.png" /><figcaption>Fig.1 Enabling cloud shell</figcaption></figure><p>2. Once enabled, clone policy library repository by executing following command:</p><pre>cloudshell_open --repo_url &quot;https://github.com/GoogleCloudPlatform/policy-library.git&quot; --page &quot;editor&quot; --force_new_clone</pre><h4>Library structure looks as follow:</h4><p>A policy library repository contains the following directories:</p><ul><li>policies/ – This directory contains two subdirectories:</li><li>constraints/ – This directory is initially empty. Place your constraint files here.</li><li>templates/ – This directory contains pre-defined constraint templates.</li><li>validator/ – This directory contains the .rego files and their associated unit tests. You don&#39;t need to touch this directory unless you intend to modify existing constraint templates or create new ones. Running make build inlines the Rego content in the corresponding constraint template files.</li></ul><p>3. When cloning is done, execute following command to copy example policy, in this case iam_service_accounts_only.yaml</p><pre>cp samples/iam_service_accounts_only.yaml policies/constraints</pre><p>4. Example policy will looks as follow :</p><pre># This constraint checks that all IAM policy members are in the<br># &quot;gserviceaccount.com&quot; domain.<br>apiVersion: constraints.gatekeeper.sh/v1alpha1<br>kind: GCPIAMAllowedPolicyMemberDomainsConstraintV2<br>metadata:<br>  name: service_accounts_only<br>  annotations:<br>    description: Checks that members that have been granted IAM roles belong to allowlisted<br>      domains.<br>spec:<br>  severity: high<br>  match:<br>    ancestries:<br>    - &quot;organizations/**&quot;<br>  parameters:<br>    domains:<br>    - gserviceaccount.com</pre><p>Policy force that only members from the gserviceaccount.com domain can be present in an IAM policy.</p><p>5. You can edit such policy and adjust parameters as you need. To verify policy behavior, we will create simple terraform main.tf file.</p><pre>terraform {<br>  required_providers {<br>    google = {<br>      source  = &quot;hashicorp/google&quot;<br>      version = &quot;5.40.0&quot;<br>    }<br>  }<br>}<br><br>variable &quot;projectID&quot; {<br>  type    = any<br>  default = &quot;PROJECT_ID&quot;<br>}<br><br>resource &quot;google_project_iam_binding&quot; &quot;sample_iam_binding&quot; {<br>  project = var.projectID<br>  role    = &quot;roles/viewer&quot;<br><br>  members = [<br>    &quot;user:user@example.com&quot;<br>  ]<br>}</pre><p>6. Once done, save and execute following commands:</p><p>a. Initialize Terraform:</p><pre>terraform init </pre><p>b. Export the Terraform plan</p><pre>terraform plan -out=test.tfplan</pre><p>c. Convert the Terraform plan to JSON</p><pre>terraform show -json ./test.tfplan &gt; ./tfplan.json</pre><p>7. By default terraform-tool package is not installed on cloud shell instance. Execute following command to install mentioned package on you cloud shell instance:</p><pre>sudo apt-get install google-cloud-sdk-terraform-tools</pre><p>8. Enter the following command to validate that your Terraform plan complies with your policies</p><pre>gcloud beta terraform vet PATH_TO_YOUR_tfplan.json_FILE --policy-library=. --format=json</pre><p>example output:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2z_y5M5-9zZMnZ00pRiw5Q.png" /><figcaption>Fig.2 Example output</figcaption></figure><p>I’ve used example provided by Google. You can customize content by editing policies from <strong>cloudshell_open/policy-library/samples/ </strong>directory</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BO12uhilruJ8wT9xV9LfOA.png" /><figcaption>Fig.3 Samples directory</figcaption></figure><p><em>You are able also to write your own policy templates.</em></p><p><em>More info 🔽</em></p><p><em>➡️ Policy Library: </em><a href="https://cloud.google.com/docs/terraform/policy-validation/create-policy-library"><em>https://cloud.google.com/docs/terraform/policy-validation/create-policy-library</em></a></p><p><em>➡️ TF Constraints: </em><a href="https://cloud.google.com/docs/terraform/policy-validation/create-terraform-constraints"><em>https://cloud.google.com/docs/terraform/policy-validation/create-terraform-constraints</em></a></p><p><em>➡️ CAI constraints: </em><a href="https://cloud.google.com/docs/terraform/policy-validation/create-cai-constraints"><em>https://cloud.google.com/docs/terraform/policy-validation/create-cai-constraints</em></a></p><h3>CICD Setup</h3><p>We have gone through the theoretical and practical parts of using Terraform Constraints. We will now use this knowledge to build a simple CICD to extend the capabilities of the <strong>terraform vet </strong>tool.</p><h4>Prepare Service Account</h4><p>For your CICD you will need Service Account and his key. I know, that on production environment you should avoid using keys and rely on Workload Identity Federation, but for demo purposes, key will be fine. So, log in to your project and follow these steps:</p><ol><li>Go to IAM -&gt; Service Accounts -&gt; CREATE SERVICE ACCOUNT -&gt; Provide all mandatory info -&gt; CREATE <br>At this stage you don’t have to assign roles. We will do it later</li><li>Once done, copy your SA email and go to your project -&gt; IAM -&gt; Grant access -&gt; Assign needed roles ( I’ve used <em>Editor </em>for this demo, <strong>but you should avoid using basic roles on production</strong>. <em>Follow least privilege rule! )</em></li><li>Once done, go to your project -&gt; IAM -&gt; Service Accounts -&gt; You service account -&gt; KEYS -&gt; ADD KEY -&gt; Create new key -&gt; Download this key and copy his content.You will use it later.</li></ol><h4>Prepare Slack</h4><p>You can skip this step if you don’t want to be notified about PR status.</p><ol><li>Create Slack workspace and pick free tier: <a href="https://slack.com/help/articles/206845317-Create-a-Slack-workspace">https://slack.com/help/articles/206845317-Create-a-Slack-workspace</a></li><li>Once done, create App on Slack. Go to <a href="https://api.slack.com/apps">https://api.slack.com/apps</a> -&gt; Create New App -&gt; From Scratch -&gt; Provide App Name and Workspace</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/637/1*i5E5jv1FbxBoIVPPPDqwWg.png" /><figcaption>Fig.5 Repository secrets</figcaption></figure><p>3. Then pick “Bots” -&gt; Scopes -&gt; Add OAuth Scope -&gt; chat:write</p><p>4. Then install to WORKSPACE_NAME</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/872/1*Ttdp8p-iqVvf2mWLfjguTQ.png" /></figure><p>5. Copy <strong>Bot User OAuth Token. </strong>You will use it later.</p><p>6. Lastly, create channel on your Slack and and copy channelID. You will use it later.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/669/1*fiyCCYSHbncgXOe-M0CusA.png" /><figcaption>Fig.6 Slack channelID</figcaption></figure><h4>Prepare repositories</h4><p>You need two GitHub repositories for utilize this CICD and terraform vet. First repository will be act as policy library and second one will be used for storing terraform code. I will not gonna describe how you can create both repositories, you can found instruction at the official GitHub documentation, here : <a href="https://docs.github.com/en/repositories/creating-and-managing-repositories/quickstart-for-repositories"><em>https://docs.github.com/en/repositories/creating-and-managing-repositories/quickstart-for-repositories</em></a></p><p>➡️ You can also utilize my repository. Just remember to make a fork: <a href="https://github.com/damiansztankowski/policy-library-gc-tf.git">https://github.com/damiansztankowski/policy-library-gc-tf.git</a></p><p>TF repo will also contain GH Actions files so we have to reconfigure a little bit this particular one. So, what we have to do is to add two secrets variables to pass in a secured way bot token and Service Account Key.</p><h4><em>How to add secrets to repository</em></h4><ol><li>Go to <strong>Settings</strong> -&gt; <strong>Secrets and variables</strong> -&gt; <strong>Actions</strong> -&gt; <strong>New repository secret</strong> -&gt; <strong>GCP_SA_KEY</strong> -&gt; Provide value from Service Account Key file</li><li>Go to <strong>Settings</strong> -&gt; <strong>Secrets</strong> <strong>and</strong> <strong>variables</strong> -&gt; <strong>Actions</strong> -&gt; <strong>New</strong> <strong>repository</strong> <strong>secret</strong> -&gt; <strong>SLACK_BOT_TOKEN</strong> -&gt; Provide value from slack App</li><li>Go to <strong>Settings</strong> -&gt; <strong>Secrets</strong> <strong>and</strong> <strong>variables</strong> -&gt; <strong>Actions</strong> -&gt; <strong>New</strong> <strong>repository</strong> <strong>secret</strong> -&gt; <strong>CHANNEL_ID</strong> -&gt; Provide value from slack channel</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1021/1*eUzc31D_udjUz4_fuQOpAA.png" /><figcaption>Fig.7 Repository secrets</figcaption></figure><p>Once done, next we have to create our workflow file.</p><ol><li>Go to Actions -&gt; Skip this and <a href="https://github.com/damiansztankowski/policy-library-gc-tf/new/main?filename=.github%2Fworkflows%2Fmain.yml&amp;workflow_template=blank">set up a workflow yourself</a> -&gt; Provide a name for your workflow -&gt; Copy/paste code from example</li></ol><pre>name: Terraform Plan and Vet<br><br>on:<br>  push:<br>    branches:<br>      - main<br>  pull_request:<br>    branches:<br>      - main<br><br>jobs:<br>  terraform:<br>    runs-on: ubuntu-latest<br>    <br>    steps:<br>    - name: Check out the repository<br>      uses: actions/checkout@v3<br><br>    - name: Authenticate to Google Cloud<br>      uses: google-github-actions/auth@v2<br>      with:<br>        credentials_json: ${{ secrets.GCP_SA_KEY }}<br><br>    - name: Set up Terraform<br>      uses: hashicorp/setup-terraform@v2<br>      with:<br>        terraform_version: 1.5.7<br>        terraform_wrapper: false<br>        <br>    - name: Install Google Cloud SDK and Terraform Tools<br>      run: |<br>        echo &quot;deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main&quot; | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list<br>        curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key --keyring /usr/share/keyrings/cloud.google.gpg add -<br>        sudo apt-get update -y<br>        sudo apt-get install -y google-cloud-sdk google-cloud-sdk-terraform-tools<br>    <br>    - name: Run gcloud beta terraform vet<br>      id: vet<br>      working-directory: Google-Cloud/Terraform-Constrait<br>      run: |<br>        git clone YOUR_LIBRARY_REPOSITORY<br>        <br>        terraform init<br>        terraform plan -out=tfplan.tfplan<br>        terraform show -json ./tfplan.tfplan &gt; ./tfplan.json<br>        echo &quot;Running gcloud beta terraform vet...&quot;<br>        VIOLATIONS=$(gcloud beta terraform vet tfplan.json --policy-library=POLICY_LIBRARY_DIRECTORY/ --format=json)<br>        retVal=$?<br>         if [ $retVal -eq 2 ]; then<br>          echo &quot;Violations found:&quot;<br>          echo &quot;$VIOLATIONS&quot;<br>          echo &quot;Not proceeding with terraform apply&quot;<br>          exit 1<br>         elif [ $retVal -ne 0 ]; then<br>          echo &quot;Error during gcloud beta terraform vet; exit code: $retVal&quot;<br>          exit 1<br>         fi<br>        <br>         echo &quot;No policy violations detected; proceeding with terraform apply&quot;<br><br>    - name: Terraform Apply<br>      if: ${{ steps.vet.outcome == &#39;success&#39; }}<br>      working-directory: Google-Cloud/Terraform-Constrait<br>      run: terraform apply tfplan.tfplan<br><br>    - name: Post Slack Notification on Workflow Failure<br>      if: failure()<br>      uses: slackapi/slack-github-action@v1.26.0<br>      with:<br>        channel-id: ${{ secrets.CHANNEL_ID }}<br>        payload: |<br>          {<br>            &quot;blocks&quot;: [<br>              { &quot;type&quot;: &quot;divider&quot; },<br>              {<br>                &quot;type&quot;: &quot;section&quot;,<br>                &quot;text&quot;: {<br>                  &quot;type&quot;: &quot;mrkdwn&quot;,<br>                  &quot;text&quot;: &quot;*Terraform Plan and Vet workflow failed.*\nCheck the logs for details&quot;<br>                }<br>              },<br>              {<br>                &quot;type&quot;: &quot;actions&quot;,<br>                &quot;elements&quot;: [<br>                  {<br>                    &quot;type&quot;: &quot;button&quot;,<br>                    &quot;text&quot;: {<br>                      &quot;type&quot;: &quot;plain_text&quot;,<br>                      &quot;text&quot;: &quot;Check your PullRequest&quot;<br>                    },<br>                    &quot;url&quot;: &quot;${{ github.event.pull_request.html_url || github.event.head_commit.url }}&quot;<br>                  }<br>                ]<br>              }<br>            ]<br>          }<br>      env:<br>        SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}<br><br>    - name: Post Slack Notification on Workflow Success<br>      if: success()<br>      uses: slackapi/slack-github-action@v1.26.0<br>      with:<br>        channel-id: ${{ secrets.CHANNEL_ID }}<br>        payload: |<br>          {<br>            &quot;blocks&quot;: [<br>              { &quot;type&quot;: &quot;divider&quot; },<br>              {<br>                &quot;type&quot;: &quot;section&quot;,<br>                &quot;text&quot;: {<br>                  &quot;type&quot;: &quot;mrkdwn&quot;,<br>                  &quot;text&quot;: &quot;*Terraform Plan and Vet workflow applied.*\nCheck the logs for details&quot;<br>                }<br>              },<br>              {<br>                &quot;type&quot;: &quot;actions&quot;,<br>                &quot;elements&quot;: [<br>                  {<br>                    &quot;type&quot;: &quot;button&quot;,<br>                    &quot;text&quot;: {<br>                      &quot;type&quot;: &quot;plain_text&quot;,<br>                      &quot;text&quot;: &quot;Check your PullRequest&quot;<br>                    },<br>                    &quot;url&quot;: &quot;${{ github.event.pull_request.html_url || github.event.head_commit.url }}&quot;<br>                  }<br>                ]<br>              }<br>            ]<br>          }<br>      env:<br>        SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}</pre><h4>Code clarification</h4><p>Code will do following steps:</p><ul><li>Check out the repository</li><li>Authenticate to Google Cloud with SA Key taken from GCP_SA_KEY secret</li><li>Set up Terraform</li><li>Install Google Cloud SDK and Terraform Tools</li><li>Execute gcloud beta terraform vet</li><li>Execute Terraform Apply if previous step has success status</li><li>Run Slack Notification depends on gcloud beta terraform vet step status</li><li>All steps will be runs on ubuntu-latest</li></ul><p>Pipeline will fail if your TF code will be not compliant with TF policy. You will also be notified on Slack about this failure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/382/1*4YlvVK8Z1gd5FsvKY6q2bQ.png" /><figcaption>Fig.8 Slack notification</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2YbSnFyyXXtNvGRVD8qM0w.png" /><figcaption>Fig.9 Slack notification</figcaption></figure><p>Code will be triggered each time new PR will be merged to main branch. Of course this Gh Action can be and even should be modified to fit better for your case.</p><h3>Conclusion</h3><p>In the rapidly evolving world of cloud infrastructure, maintaining security, consistency, and compliance is more critical than ever. By integrating policy enforcement into your Infrastructure as Code practices using tools like gcloud beta terraform vet, you can proactively manage risks and ensure that your deployments align with organizational standards.</p><p>The approach detailed in this post empowers your DevOps teams to catch and resolve issues early in the CI/CD pipeline, reducing the likelihood of costly errors in production. Moreover, automating these checks fosters a culture of continuous improvement, where security and compliance are ingrained in every deployment.</p><p>As you continue to refine your infrastructure management strategies, remember that robust policy enforcement isn’t just about avoiding mistakes — it’s about building a resilient, secure, and scalable environment that can adapt to the demands of modern cloud computing. Embrace these practices, and you’ll be well on your way to unleashing the full potential of Secure DevOps in your organization.</p><p>Do not forget the 👏✌️❤️ if you like this content!</p><p>Also, I will be glad if you hit the follow button so you get notified of my new posts.</p><p>You can also follow me on <a href="https://www.linkedin.com/in/damian-sztankowski-95878b2a8/"><strong>LinkedIn</strong></a><strong>.</strong></p><p>You can join our <a href="https://www.linkedin.com/groups/9824115/"><strong>Google Cloud Community Poland</strong></a> LinkedIn group. It’s open!</p><p>Thank you!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=61f7d49ed5f6" width="1" height="1" alt=""><hr><p><a href="https://medium.com/google-cloud/unleashing-secure-devops-empowering-policy-enforcement-in-infrastructure-as-code-61f7d49ed5f6">Unleashing Secure DevOps: Empowering Policy Enforcement in Infrastructure-as-Code</a> was originally published in <a href="https://medium.com/google-cloud">Google Cloud - Community</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[“Seamless Cloud SQL Migration: How to Move Your Data Between Google Cloud Projects with Ease”]]></title>
            <link>https://medium.com/google-cloud/seamless-cloud-sql-migration-how-to-move-your-data-between-google-cloud-projects-with-ease-ee1592fd49c6?source=rss-614d11a8fe5a------2</link>
            <guid isPermaLink="false">https://medium.com/p/ee1592fd49c6</guid>
            <category><![CDATA[cloud-sql]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[migration]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[infrastructure-management]]></category>
            <dc:creator><![CDATA[Damian Sztankowski]]></dc:creator>
            <pubDate>Thu, 25 Jul 2024 00:57:01 GMT</pubDate>
            <atom:updated>2024-07-25T00:57:01.116Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6CSV7IlSW04X9eLhNdeM2Q.png" /></figure><p>Recently I’ve found interesting question on Google Cloud Community, about restoring backup of MySQL instance to different instance at different project. That question got my attention so I’ve decided to not only help, but also create sort of guideline for anyone who might facing the same problem.</p><p>➡️ Link to community topic: <a href="https://www.googlecloudcommunity.com/gc/Databases/GCP-cloud-SQL-Restore-to-a-different-instance-on-different/m-p/744426#M2954">https://www.googlecloudcommunity.com/gc/Databases/GCP-cloud-SQL-Restore-to-a-different-instance-on-different/m-p/744426#M2954</a></p><h3>Types of Databases in CloudSQL</h3><p>Before we start doing magic, it’s worth to mention, what is CloudSQL, what types of databases Google Cloud can offer in terms of CloudSQL service. So basically CloudSQL is :</p><blockquote>Fully managed, cost-effective relational database service for <a href="https://cloud.google.com/sql/postgresql?hl=en">PostgreSQL</a>, <a href="https://cloud.google.com/sql/mysql?hl=en">MySQL</a>, and <a href="https://cloud.google.com/sql/sqlserver?hl=en">SQL Server</a>. Try <a href="https://cloud.google.com/sql?e=48754805#pricing">Enterprise Plus edition</a> for a 99.99% availability SLA and category-leading performance.</blockquote><blockquote><a href="https://cloud.google.com/sql?hl=en">https://cloud.google.com/sql?hl=en</a></blockquote><p>CloudSQL provide following features:</p><ul><li>Fully managed</li><li>Price performance options</li><li>High availability with near sub-second downtime maintenance</li><li>Gemini in Cloud SQL</li><li>Firebase Data Connect</li></ul><p>📹 YouTube video for CloudSQL</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fq6noaMAnk5s%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dq6noaMAnk5s&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fq6noaMAnk5s%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/e0b6b7e8b3fa8de51685a093411ed390/href">https://medium.com/media/e0b6b7e8b3fa8de51685a093411ed390/href</a></iframe><p>Moving forward, CloudSQL offer following types of databases:</p><h4>MySQL:</h4><ul><li>Versions Supported: CloudSQL supports MySQL versions 5.6, 5.7, and 8.0.</li><li>Use Cases: Suitable for web applications, content management systems, and online transaction processing (OLTP).</li><li>Features: Provides high availability, automated backups, and read replicas for scalability.</li></ul><h4>PostgreSQL:</h4><ul><li>Versions Supported: CloudSQL supports PostgreSQL versions from 9.6 to 15.</li><li>Use Cases: Preferred for complex queries, analytical workloads, and GIS data due to its advanced features.</li><li>Features: Supports advanced data types, full-text search, and extensions like PostGIS.</li></ul><h4>SQL Server:</h4><ul><li>Versions Supported: CloudSQL supports SQL Server 2017 and 2019.</li><li>Use Cases: Common in enterprise environments, suitable for large-scale OLTP and business intelligence applications.</li><li>Features: Includes support for SQL Server Analysis Services (SSAS), SQL Server Integration Services (SSIS), and SQL Server Reporting Services (SSRS).</li></ul><p>➡️ I’m talking only about CloudSQL, however Google offers much more. If you don’t know which type of DB you should choose, follow this mini guide and look at use-case examples:<br><a href="https://cloud.google.com/products/databases?hl=en">https://cloud.google.com/products/databases?hl=en</a></p><h3>Migration process</h3><p>We’ve went so far trough types of databases available at Google Cloud. But how such DBs can be migrated to other project? Unfortunately there is no such option available via UI. In fact, there is no gcloud command, which allows you to migrate DBs, between projects. The one solution, which I found when I’ve tried to replicate issue described at community post, was REST API usage. Following command present example of REST API usage:</p><pre>curl -X POST \<br>     -H &quot;Authorization: Bearer $(gcloud auth print-access-token)&quot; \<br>     -H &quot;Content-Type: application/json; charset=utf-8&quot; \<br>     -d @request.json \<br>     &quot;https://sqladmin.googleapis.com/sql/v1beta4/projects/TARGET_PROJECT_ID/instances/TARGET_SQL_INSTANCE_NAME/restoreBackup&quot;</pre><ul><li><strong><em>H “Authorization: Bearer $(gcloud auth print-access-token)”</em></strong> — is responsible for obtaining auth token<br><strong><em>-d @request.json</em> </strong>— is responsible for keeping SQL instance data</li></ul><p>➡️ More info about REST API for SQL: <a href="https://cloud.google.com/sql/docs/mysql/apis">https://cloud.google.com/sql/docs/mysql/apis</a></p><h3>Migration process</h3><p>Following steps will guid you through entire process, so you should be able to migrate your project without any issues.</p><ol><li>Create at the target project SQLInstance : <a href="https://cloud.google.com/sql/docs/mysql/create-instance">https://cloud.google.com/sql/docs/mysql/create-instance</a></li><li>Obtain SQLInstance ID ( in other words, SQL Instance name )<br><a href="https://cloud.google.com/sql/docs/mysql/instance-info#info">https://cloud.google.com/sql/docs/mysql/instance-info#info</a></li><li>Run following command to obtain backupID</li></ol><pre>curl -X GET \<br>     -H &quot;Authorization: Bearer $(gcloud auth print-access-token)&quot; \<br>  &quot;https://sqladmin.googleapis.com/sql/v1beta4/projects/SOURCE_PROJECT_ID/instances/SOURCE_SQL_INSTANCE_NAME/backupRuns&quot;</pre><p>4. You will get output similar to :</p><pre>damian_sztankowski@cloudshell:~ (projecta-421511)$ curl -X GET      -H &quot;Authorization: Bearer $(gcloud auth print-access-token)&quot;      &quot;https://sqladmin.googleapis.com/sql/v1beta4/projects/projecta-421511/instances/testprojecta/backupRuns&quot;<br>{<br>  &quot;kind&quot;: &quot;sql#backupRunsList&quot;,<br>  &quot;items&quot;: [<br>    {<br>      &quot;kind&quot;: &quot;sql#backupRun&quot;,<br>      &quot;status&quot;: &quot;SUCCESSFUL&quot;,<br>      &quot;enqueuedTime&quot;: &quot;2024-04-29T04:37:55.560Z&quot;,<br>      &quot;id&quot;: &quot;1714365475560&quot;,<br>      &quot;startTime&quot;: &quot;2024-04-29T04:37:55.580Z&quot;,<br>      &quot;endTime&quot;: &quot;2024-04-29T04:39:26.945Z&quot;,<br>      &quot;type&quot;: &quot;ON_DEMAND&quot;,<br>      &quot;windowStartTime&quot;: &quot;2024-04-29T04:37:55.560Z&quot;,<br>      &quot;instance&quot;: &quot;testprojecta&quot;,<br>      &quot;selfLink&quot;: &quot;https://sqladmin.googleapis.com/sql/v1beta4/projects/projecta-421511/instances/testprojecta/backupRuns/1714365475560&quot;,<br>      &quot;location&quot;: &quot;us&quot;,<br>      &quot;backupKind&quot;: &quot;SNAPSHOT&quot;<br>    },<br>    {<br>      &quot;kind&quot;: &quot;sql#backupRun&quot;,<br>      &quot;status&quot;: &quot;SUCCESSFUL&quot;,<br>      &quot;enqueuedTime&quot;: &quot;2024-04-29T04:35:30.777Z&quot;,<br>      &quot;id&quot;: &quot;1714365330777&quot;, &lt;- backup ID ( will be needed )<br>      &quot;startTime&quot;: &quot;2024-04-29T04:35:30.804Z&quot;,<br>      &quot;endTime&quot;: &quot;2024-04-29T04:37:02.218Z&quot;,<br>      &quot;type&quot;: &quot;AUTOMATED&quot;,<br>      &quot;description&quot;: &quot;Backup automatically created after creating an instance with PITR enabled&quot;,<br>      &quot;windowStartTime&quot;: &quot;2024-04-29T04:35:30.777Z&quot;,<br>      &quot;instance&quot;: &quot;testprojecta&quot;, &lt;- instance NAME ( will be needed )<br>      &quot;selfLink&quot;: &quot;https://sqladmin.googleapis.com/sql/v1beta4/projects/projecta-421511/instances/testprojecta/backupRuns/1714365330777&quot;,<br>      &quot;location&quot;: &quot;us&quot;,<br>      &quot;backupKind&quot;: &quot;SNAPSHOT&quot;<br>    }<br>  ]<br>}</pre><p>5. Create request.json file and provide info:</p><pre>{<br>  &quot;restoreBackupContext&quot;:<br>  {<br>    &quot;backupRunId&quot;: 1714365330777, &lt;- This backup will be restored at another project<br>    &quot;project&quot;: &quot;projecta-421511&quot;, &lt;- source project<br>    &quot;instanceId&quot;: &quot;testprojecta&quot; &lt;- source INSTANCE SQL NAME<br>  }<br>}</pre><p>6. Execute following command to trigger restore</p><pre>curl -X POST \<br>     -H &quot;Authorization: Bearer $(gcloud auth print-access-token)&quot; \<br>     -H &quot;Content-Type: application/json; charset=utf-8&quot; \<br>     -d @request.json \<br>     &quot;https://sqladmin.googleapis.com/sql/v1beta4/projects/TARGET_PROJECT_ID/instances/TARGET_SQL_INSTANCE_NAME/restoreBackup&quot;</pre><p>Command should send similar output :</p><pre>damian_sztankowski@cloudshell:~ (projecta-421511)$ curl -X POST \<br>     -H &quot;Authorization: Bearer $(gcloud auth print-access-token)&quot; \<br>     -H &quot;Content-Type: application/json; charset=utf-8&quot; \<br>     -d @request.json \<br>     &quot;https://sqladmin.googleapis.com/sql/v1beta4/projects/project-b-421511/instances/tetsprojectb/restoreBackup&quot;<br>{<br>  &quot;kind&quot;: &quot;sql#operation&quot;,<br>  &quot;targetLink&quot;: &quot;https://sqladmin.googleapis.com/sql/v1beta4/projects/project-b-421511/instances/tetsprojectb&quot;,<br>  &quot;status&quot;: &quot;PENDING&quot;, &lt;- it means that restore has been started<br>  &quot;user&quot;: &quot;damian.sztankowski&quot;,<br>  &quot;insertTime&quot;: &quot;2024-04-29T04:56:18.903Z&quot;,<br>  &quot;operationType&quot;: &quot;RESTORE_VOLUME&quot;,<br>  &quot;name&quot;: &quot;d320975e-6032-4b72-b7dd-afb000000032&quot;,<br>  &quot;targetId&quot;: &quot;tetsprojectb&quot;,<br>  &quot;selfLink&quot;: &quot;https://sqladmin.googleapis.com/sql/v1beta4/projects/project-b-421511/operations/d320975e-6032-4b72-b7dd-afb000000032&quot;,<br>  &quot;targetProject&quot;: &quot;project-b-421511</pre><p>7. Go to TARGET PROJECT -&gt; SQL -&gt; Backups. Wait until restore will end.</p><p>⚠️ Important: The user restoring to a different project must have the <strong>cloudsql.instances.restoreBackup</strong> permission for the target project and the <strong>cloudsql.backupRuns.get</strong> permission for the source instance. These permissions are included in the <strong>Cloud SQL Admin</strong> role.</p><p>➡️ More info about restoring backup: <a href="https://cloud.google.com/sql/docs/mysql/backup-recovery/restoring#projectid">https://cloud.google.com/sql/docs/mysql/backup-recovery/restoring#projectid</a></p><p>Do not forget the 👏✌️❤️ if you like this content!</p><p>Also, I will be glad if you hit the follow button so you get notified of my new posts.</p><p>You can also follow me on <a href="https://www.linkedin.com/in/damian-sztankowski-95878b2a8/"><strong>LinkedIn</strong></a><strong>.</strong></p><p>You can join our <a href="https://www.linkedin.com/groups/9824115/"><strong>Google Cloud Community Poland</strong></a> LinkedIn group. It’s open!</p><p>Thank you!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ee1592fd49c6" width="1" height="1" alt=""><hr><p><a href="https://medium.com/google-cloud/seamless-cloud-sql-migration-how-to-move-your-data-between-google-cloud-projects-with-ease-ee1592fd49c6">“Seamless Cloud SQL Migration: How to Move Your Data Between Google Cloud Projects with Ease”</a> was originally published in <a href="https://medium.com/google-cloud">Google Cloud - Community</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Troubleshooting 101: Solving the “Service Account Key Creation is Disabled” error.]]></title>
            <link>https://medium.com/google-cloud/troubleshooting-101-solving-the-service-account-key-creation-is-disabled-error-9dd88c45cee4?source=rss-614d11a8fe5a------2</link>
            <guid isPermaLink="false">https://medium.com/p/9dd88c45cee4</guid>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[gcp-security-operations]]></category>
            <category><![CDATA[iam-policy]]></category>
            <category><![CDATA[best-practices]]></category>
            <dc:creator><![CDATA[Damian Sztankowski]]></dc:creator>
            <pubDate>Tue, 11 Jun 2024 02:24:05 GMT</pubDate>
            <atom:updated>2024-06-11T02:24:05.658Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GQIsj0s6C2avlF2ikGokcQ.png" /></figure><h3>Understanding Service Account Key Creation and Its Implications in Google Cloud</h3><h4>1. What Does It Mean When Service Account Key Creation is Disabled?</h4><p>When service account key creation is disabled in Google Cloud, it means that users and applications within your Google Cloud organization are prevented from generating new private keys for service accounts. Service accounts are special types of accounts used by applications and virtual machines (VMs) to interact with other Google Cloud services.</p><p>Private keys are critical for authenticating and authorizing service accounts to access resources. Disabling the creation of these keys is a security measure to reduce the risk associated with managing and securing these keys. Once the policy is enforced, existing keys can still be used until they are revoked or expire, but no new keys can be generated.</p><h4>2. Reason Behind That Enforcement</h4><p>Disabling service account key creation is enforced to enhance the security of your Google Cloud environment. Here are some key reasons for this enforcement:</p><ul><li><strong>Minimize Security Risks</strong>: Private keys can be compromised if not handled securely. Disabling key creation reduces the risk of these keys being exposed, stolen, or misused.</li><li><strong>Encourage Best Practices</strong>: Google Cloud provides better alternatives such as Workload Identity Federation and IAM roles, which offer more secure and manageable ways to grant permissions without relying on long-lived keys.</li><li><strong>Reduce Operational Overhead</strong>: Managing and rotating keys can be complex and error-prone. By disabling key creation, organizations can avoid the operational burden associated with key management.</li><li><strong>Compliance and Governance</strong>: Many industries have strict compliance and governance requirements. Disabling key creation helps meet these requirements by ensuring that sensitive credentials are not mishandled.</li></ul><p>So to deal with this enforcement, you should either use Workload Identity Federation ( preferred way) or expressly allow SA key creation on TAG-based projects.</p><p>Before you will go with Org Policy changes, please read prerequisites for the assignment of the role of organization policy administrator:</p><ol><li><strong>Organizational Access</strong>:</li></ol><ul><li>You need to have access to the Google Cloud organization where you want to assign the role.</li></ul><p>2<strong>. Administrative Permissions</strong>:</p><ul><li>You must have one of the following roles:</li><li><strong>Organization Admin</strong> (roles/resourcemanager.organizationAdmin)</li><li><strong>IAM Admin</strong> (roles/resourcemanager.organizationAdmin) or an equivalent role with the necessary permissions to manage IAM roles and policies at the organizational level.</li></ul><p>3.<strong> Google Cloud Console Access</strong>:</p><ul><li>Ensure you have access to the Google Cloud Console. You can access it at <a href="https://console.cloud.google.com/">Google Cloud Console</a>.</li></ul><h4>3. Steps to Assign Organization Policy Admin</h4><p>To assign the Organization Policy Admin role, follow these steps:</p><p><strong>Step-by-Step Guide</strong>:</p><ol><li><strong>Open Google Cloud Console</strong>:</li></ol><ul><li>Go to Google Cloud Console.</li></ul><p>2.<strong> Navigate to IAM &amp; Admin</strong>:</p><ul><li>In the left-hand navigation pane, click on <strong>IAM &amp; Admin</strong>.</li><li>Select <strong>IAM</strong>.</li></ul><p>3.<strong> Select the Organization</strong>:</p><ul><li>If you manage multiple organizations, select the appropriate organization from the organization selector drop-down at the top of the page.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/0*AlxBdyFRsX01YPci" /><figcaption>Fig1. Select appropriate organization</figcaption></figure><p>4. <strong>Add a Member</strong>:</p><ul><li>Click on the <strong>Add</strong> button at the top of the IAM page.</li></ul><p>5.<strong> Enter Member Information</strong>:</p><ul><li>In the <strong>New members</strong> field, enter the email address of the user or service account you want to assign the role to.</li></ul><p>6.<strong> Assign Role</strong>:</p><ul><li>Click on the <strong>Select a role</strong> drop-down menu.</li><li>Under <strong>Resource Manager</strong>, select <strong>Organization Policy Administrator</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/0*Nm2P9wq55MSXC5et" /><figcaption>Fig2. Add principal email</figcaption></figure><p>7.<strong> Save Changes</strong>:</p><ul><li>Click <strong>Save</strong> to assign the role to the selected member.</li></ul><h4><strong>4.</strong> Assign TAG for project</h4><ol><li>Open the <strong>Tags</strong> page in the Google Cloud console : <a href="https://console.cloud.google.com/iam-admin/tags">Open Tags page</a></li><li>From the <strong>Scope picker</strong> at the top of the page, select the organization or project under which you want to create a tag key.</li><li>Click <strong>Create</strong>.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/399/0*piSAHMm0MSxgbriW" /><figcaption>Fig3. Create tag</figcaption></figure><p>4. In the <strong>Tag key</strong> box, enter the display name of your tag key. This becomes part of the namespaced name of your tag.</p><p>5. In the <strong>Tag key description</strong> box, enter a description of your tag key.</p><p>6. If you want to add tag values to this key, click add <strong>Add value</strong> for each tag value you want to create.</p><p>7. In the <strong>Tag value</strong> box, enter the display name of your tag value. This becomes part of the namespaced name of your tag.</p><p>8. In the <strong>Tag value description</strong> box, enter a description of your tag value.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/337/0*EAjX9KDdY3ktbDFN" /><figcaption>Fig4. Add TAG values</figcaption></figure><p>9. When you have finished adding tag values, click <strong>Create tag key</strong>.</p><h4>5. Exclude project from org policy with TAG</h4><ol><li>In the Google Cloud console, go to the <strong>Organization policies</strong> page.</li><li><a href="https://console.cloud.google.com/iam-admin/orgpolicies">Go to Organization policies</a></li><li>From the project picker, select the project for which you want to set the organization policy.</li><li>On the <strong>Organization policies</strong> page, select a constraint from the list. The <strong>Policy details</strong> page for that constraint appears.</li><li>To update the organization policy for this resource, click <strong>Manage policy</strong>.</li><li>On the <strong>Edit policy</strong> page, select <strong>Override parent’s policy</strong>.</li><li>Under <strong>Policy enforcement</strong>, select an enforcement option:</li></ol><ul><li>To merge and evaluate your organization policies together, select <strong>Merge with parent</strong>. For more information about inheritance and the resource hierarchy, see <a href="https://cloud.google.com/resource-manager/docs/organization-policy/understanding-hierarchy">Understanding Hierarchy Evaluation</a>.</li><li>To override policies inherited from a parent resource, select <strong>Replace</strong>.</li></ul><p>8. Click <strong>Add rule</strong>.</p><p>9. Under <strong>Policy values</strong>, select whether this organization policy should allow all values, deny all values, or specify a custom set of values.</p><ul><li>Specific values accepted by the policy depend on the service to which the policy applies. For a list of constraints and the values they accept, see <a href="https://cloud.google.com/resource-manager/docs/organization-policy/org-policy-constraints">Organization policy constraints</a>.</li></ul><p>10. Optionally, to make the organization policy conditional on a tag, click <strong>Add condition</strong>.</p><ul><li>In the <strong>Title</strong> field, enter a name for the condition.</li><li>In the <strong>Description</strong> field, give your condition a description. The description provides context on the tags that are required and how they impact resources.</li><li>You can use the <strong>Condition builder</strong> to create a condition that requires a particular tag for the constraint to take effect.</li><li>In the <strong>Condition type</strong> box, select <strong>Tag</strong>.</li><li>Select the <strong>Operator</strong> for your condition. To match an entire tag, use the <strong>matches</strong> operator. To match a tag key and a tag value, use the <strong>matches ID</strong> operator.</li><li>If you selected the <strong>matches</strong> operator, enter the value namespaced name of the tag. If you selected the <strong>matches ID</strong> operator, enter the key and value IDs.</li><li>You can create multiple conditions by clicking <strong>Add</strong>. If you add another condition, you can set the conditional logic to require all of them by toggling <strong>And</strong>. You can set the conditional logic to require only one of the conditions to be true by toggling <strong>Or</strong>.</li><li>You can delete an expression by clicking the large <strong>X</strong> to the right of the condition fields.</li><li>When you have finished editing your conditions, click <strong>Save</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/0*66q96LKQSao9B8d_" /><figcaption>Fig5. Combine condition</figcaption></figure><p><strong>⚠️ Warning:</strong> If you create a query that includes the <strong>! logical</strong> operator in the Condition editor, the Condition builder displays an error message and is not able to render the query. The query will function, but you must use the Condition editor to make any further changes to the query.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/264/0*8JDNVsroKN1KHNgc" /><figcaption>Fig6. Organization constraint with two rules</figcaption></figure><p>11. To finish and apply the organization policy, click Save.</p><h4>6. Test your settings</h4><p>Here we have project without TAG. As we can see, there is no possibility to create key for Service Account, due to Organization Policy restrictions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/399/0*EI5mb1_onFiy5ZFN" /><figcaption>Fig7. Project without TAG assigned</figcaption></figure><p>and project with TAG, where we’ve created SA key without any errors</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/0*CzDmuW3s8BAVsJos" /><figcaption>Fig8. Project with TAG assigned</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4XVAA6b7qQo8Koxc1kTuhg.png" /><figcaption>Fig9. TAGs view for projects</figcaption></figure><h3>Conclusion</h3><p>Handling the “Service account key creation is disabled” error in Google Cloud can seem daunting, but by following the steps outlined in this guide, you can effectively navigate this challenge. Disabling service account key creation is a crucial security measure designed to minimize risks, encourage best practices, reduce operational overhead, and ensure compliance.</p><p>By leveraging alternatives such as Workload Identity Federation and carefully managing IAM roles, you can maintain secure and efficient access to your Google Cloud resources. Additionally, understanding and utilizing organization policies and tags can provide the necessary flexibility to manage exceptions while adhering to security standards.</p><p>Remember, enhancing security often involves adopting new practices and tools, and the effort invested in understanding these processes will pay off in the long run. Stay proactive in managing your cloud environment, and you’ll not only overcome this error but also build a more secure and robust infrastructure.</p><p>Do not forget the 👏✌️❤️ if you like this content!</p><p>Also, I will be glad if you hit the follow button so you get notified of my new posts.</p><p>You can also follow me on <a href="https://www.linkedin.com/in/damian-sztankowski-95878b2a8/"><strong>LinkedIn</strong></a><strong>.</strong></p><p>You can join our <a href="https://www.linkedin.com/groups/9824115/"><strong>Google Cloud Community Poland</strong></a> LinkedIn group. It’s open!</p><p>Thank you!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9dd88c45cee4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/google-cloud/troubleshooting-101-solving-the-service-account-key-creation-is-disabled-error-9dd88c45cee4">Troubleshooting 101: Solving the “Service Account Key Creation is Disabled” error.</a> was originally published in <a href="https://medium.com/google-cloud">Google Cloud - Community</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Setup Temporary elevated access for Google Cloud with PAM]]></title>
            <link>https://medium.com/google-cloud/setup-temporary-elevated-access-for-google-cloud-with-pam-1ed98d6098b3?source=rss-614d11a8fe5a------2</link>
            <guid isPermaLink="false">https://medium.com/p/1ed98d6098b3</guid>
            <category><![CDATA[security]]></category>
            <category><![CDATA[privilege-escalation]]></category>
            <category><![CDATA[iam-roles]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[gcp-security-operations]]></category>
            <dc:creator><![CDATA[Damian Sztankowski]]></dc:creator>
            <pubDate>Fri, 10 May 2024 05:50:10 GMT</pubDate>
            <atom:updated>2024-05-10T05:50:10.847Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K83VzvK4cZWYiMUiLK9A2w.png" /></figure><h3>Intro</h3><p>I was fighting recently with approach for granting time-based access to my organization. I didn’t wanted to use 3rd party solution like CyberArk (which is super great). I wanted to utilize something cloud native, provided by vendor. I found open-community project called “Just-in-time”. That was fantastic approach at that time. But today I’ve discovered that Google Cloud pushed into Pre-GA phase service called Privileged Access Manager (PAM)</p><p>➡️ More info about JIT <a href="https://cloud.google.com/architecture/manage-just-in-time-privileged-access-to-project">here</a></p><h3>Short info about PAM</h3><p>Privileged Access Manager (PAM) is a security solution designed to manage, monitor, and secure access to privileged accounts within an organization’s IT infrastructure. These privileged accounts typically have elevated permissions and access to sensitive resources, making them a prime target for cyber attackers.</p><p>You can use PAM in following situations:</p><ul><li>As a general practice, instead of permanently granting roles. Combined with approvals and justifications, this lets you manage access to sensitive resources without resorting to permanently over-permissioned principals. You can also use PAM to audit when granted roles were active for a principal, what resources were accessible during that time, what the justification was for that access, and who approved the access.</li><li>For select emergency responders, to allow them to perform critical tasks without having to wait for approval. You can require justifications for additional context on why the emergency access is needed.</li><li>For service accounts, to only grant them roles when they need the roles to perform an automated task.</li><li>For contractors, to allow temporary access to resources during business hours that requires approvals and justifications.</li></ul><h3>How to enable PAM</h3><p>PAM can be configured at the organization, folder, or project level. You need also mandatory permissions to do that, so before you start:</p><p>Grant you the following IAM roles on the organization, folder, or project:</p><ul><li>To create, update, and delete entitlements: Privileged Access Manager Admin (roles/privilegedaccessmanager.admin). Additionally, either Folder IAM Admin (roles/resourcemanager.folderIamAdmin), Project IAM Admin (roles/resourcemanager.projectIamAdmin), or Security Admin (roles/iam.securityAdmin)</li><li>To view entitlements and grants: <a href="https://cloud.google.com/iam/docs/understanding-roles#privilegedaccessmanager.viewer">Privileged Access Manager Viewer </a>(roles/privilegedaccessmanager.viewer)</li><li>To view audit logs: <a href="https://cloud.google.com/iam/docs/understanding-roles#logs.viewer">Logs Viewer </a>(roles/logs.viewer)</li></ul><p>The following permissions are required to work with entitlements and grants:</p><ul><li>To enable PAM at the organization, folder, or project scope:</li><li>privilegedaccessmanager.locations.checkOnboardingStatus</li><li>resourcemanager.organizations.get</li><li>resourcemanager.organizations.getIamPolicy</li><li>resourcemanager.organizations.setIamPolicy</li><li>resourcemanager.folders.get</li><li>resourcemanager.folders.getIamPolicy</li><li>resourcemanager.folders.setIamPolicy</li><li>resourcemanager.projects.get</li><li>resourcemanager.projects.getIamPolicy</li><li>resourcemanager.projects.setIamPolicy</li><li>To manage entitlements and grants:</li><li>resourcemanager.folders.get</li><li>resourcemanager.organizations.get</li><li>resourcemanager.projects.get</li><li>privilegedaccessmanager.entitlements.create</li><li>privilegedaccessmanager.entitlements.delete</li><li>privilegedaccessmanager.entitlements.get</li><li>privilegedaccessmanager.entitlements.list</li><li>privilegedaccessmanager.entitlements.setIamPolicy</li><li>privilegedaccessmanager.grants.get</li><li>privilegedaccessmanager.grants.list</li><li>privilegedaccessmanager.grants.revoke</li><li>privilegedaccessmanager.locations.get</li><li>privilegedaccessmanager.locations.list</li><li>privilegedaccessmanager.operations.delete</li><li>privilegedaccessmanager.operations.get</li><li>privilegedaccessmanager.operations.list</li><li>To view entitlements and grants:</li><li>resourcemanager.folders.get</li><li>resourcemanager.organizations.get</li><li>resourcemanager.projects.get</li><li>privilegedaccessmanager.entitlements.get</li><li>privilegedaccessmanager.entitlements.list</li><li>privilegedaccessmanager.grants.get</li><li>privilegedaccessmanager.grants.list</li><li>privilegedaccessmanager.locations.get</li><li>privilegedaccessmanager.locations.list</li><li>privilegedaccessmanager.operations.get</li><li>privilegedaccessmanager.operations.list</li><li>To view audit logs: logging.logEntries.list</li></ul><p>You might also be able to get these permissions with <a href="https://cloud.google.com/iam/docs/creating-custom-roles">custom roles</a> or other <a href="https://cloud.google.com/iam/docs/understanding-roles">predefined roles</a>.</p><p>➡️ More info about managing accesses can be found <a href="https://cloud.google.com/iam/docs/granting-changing-revoking-access">here</a></p><p>Once granted, complete following steps to enable PAM:</p><ol><li>Go to the <strong>Privileged Access Manager</strong> page.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/637/1*3guT0c9zLqp8yYEBwBY5Cw.png" /><figcaption>Fig1. PAM</figcaption></figure><p>2. Select the organization, folder, or project that you want to enable PAM for.</p><p>ℹ️ Enabling PAM for an organization or folder also enables PAM for all folders and projects below them in the <a href="https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy">resource hierarchy</a>.</p><p>3. Click <strong>Enable PAM</strong> to enable the service for the selected resource scope. 4. When asked to grant the <strong>Privileged Access Manager Service Agent</strong> role to the <a href="https://cloud.google.com/iam/docs/service-account-types#service-agents">Privileged Access Manager Service Agent</a> to manage privilege escalations, click <strong>Grant role</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/776/1*AQ6v4M_B9nHjps7pIuX4pQ.png" /><figcaption>Fig2. Complete setup for PAM</figcaption></figure><p>5. Click <strong>Complete setup</strong>.</p><h3>How to create entitlements</h3><p>Once PAM has been enabled, we are able to create entitlements.</p><blockquote>Entitlements can be created at the organization, folder, or project level. Roles granted by an entitlement at each level follow the Google Cloud <a href="https://cloud.google.com/iam/docs/resource-hierarchy-access-control">resource hierarchy</a>.</blockquote><blockquote>For example, roles granted by an entitlement at the organization level are inherited at the folder and project levels.</blockquote><blockquote><a href="https://cloud.google.com/iam/docs/pam-create-entitlements">https://cloud.google.com/iam/docs/pam-create-entitlements</a></blockquote><h4>Before you begin</h4><p>Make sure you have <a href="https://cloud.google.com/iam/docs/pam-permissions-and-setup">enabled PAM and set up permissions for it</a>.</p><p>To create entitlements complete following steps:</p><ol><li>Go to the <strong>Privileged Access Manager</strong> page.</li><li>Select the organization, folder, or project you want the entitlement to apply to.</li><li>Click the <strong>Entitlements</strong> tab.</li><li>Click <strong>Create</strong>.</li><li>You will see following image. Fill out mandtary fields (marked with red asteriks)</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/520/1*1XzpPe38nFrZC22fzFL1NQ.png" /><figcaption>Fig3. Entitlement for SQL Admin example</figcaption></figure><p>6. Add requestors. You can add email group (best approach) or individual principal</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/551/1*veB9fw1zS5wkA17cNWTk1g.png" /><figcaption>Fig4. Adding requestors to entitlement</figcaption></figure><p>7. Add approvers. You can add email group or single principal as approver. Additionally, you can configure entitlement to being approved automatically by ticking “Activate access without approvals” checkbox.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/537/1*2X7aj1G7S3ueS6x_YoF7UA.png" /><figcaption>Fig5. Adding approvers</figcaption></figure><p>8. You can add additional notifications emails if for example you want to notify customers also about entitlement.</p><blockquote>Add the email addresses of people to notify when the entitlement is available to request, when a grant is pending approval, and when a requester is granted access. Google identities associated with the entitlement, like approvers and requesters, are automatically notified. However, you might want to notify a different set of email addresses, especially if you’re using <a href="https://cloud.google.com/iam/docs/workforce-identity-federation">Workforce Identity Federation</a>.</blockquote><blockquote><a href="https://cloud.google.com/iam/docs/pam-create-entitlements">https://cloud.google.com/iam/docs/pam-create-entitlements</a></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/526/1*3P0BjHgaihkTMPIhM_gj6Q.png" /><figcaption>Fig6. Additional notifications</figcaption></figure><p>9. Click <strong>Create Entitlement</strong>.</p><p>ℹ️ You can use also condition(s) to configure more restricted accesses. More info <a href="https://cloud.google.com/iam/docs/conditions-overview">here</a></p><p>10. Once done, you should get information about assignment on your email.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dpeY2waBVlggPSxP2ck0nw.png" /><figcaption>Fig7. Assignment information</figcaption></figure><p>ℹ️ You are able also to configure PAM programatically. More info <a href="https://cloud.google.com/iam/docs/pam-create-entitlements#create_entitlements_programmatically">here</a></p><h3>How to use PAM</h3><h4>Requestor side</h4><p>Before you begin, you must have access to project, folder or organization where access will be requested.</p><p>If you have mentioned access, complete following steps to send a request for particular entitlement via PAM.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/803/1*pxfxsnokWVDUL2g3NcdveQ.png" /><figcaption>Fig8. Lack of SQL permissions</figcaption></figure><ol><li>Go to the <strong>Privileged Access Manager</strong> page.</li><li>Select the organization, folder, or project you want to request a grant in.</li><li>In the <strong>My entitlements</strong> tab, find the entitlement to request against, and then click <strong>Request grant</strong> in the same row.</li></ol><p>4. Provide the following details:</p><ul><li>The duration required for the grant, up to the maximum duration set on the entitlement.</li><li>If required, a justification for the grant.</li><li>Optional: Which email addresses to notify of the grant request. Google identities associated with approvers are automatically notified. However, you might want to notify a different set of email addresses, especially if you’re using <a href="https://cloud.google.com/iam/docs/workforce-identity-federation">Workforce Identity Federation</a>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FW9ggjsRavYWjJw1S-Glqg.png" /><figcaption>Fig10. Providing details</figcaption></figure><p>5. Click <strong>Request grant</strong>.</p><p>6. To see your grant history including approval statuses, click the <strong>Grants</strong> tab, followed by the <strong>My grants</strong> tab.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YDeyOTUjvg7-LoboEOMrfQ.png" /><figcaption>Fig11 Status</figcaption></figure><h4>Approver side</h4><p>As an approver you have big power. Remember, that YOU are not able to APPROVE YOUR REQUEST.</p><p>To approve / deny request complete following steps:</p><ol><li>Go to the <strong>Privileged Access Manager</strong> page.</li><li>Click the <strong>Approve grants</strong> tab, followed by the <strong>Pending approval</strong> tab.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UPjtzXxBaqXz9gWqIe7d_g.png" /><figcaption>Fig12. Pending approvals</figcaption></figure><ol><li>In the row related to the request you want to approve or deny, click <strong>Approve/deny</strong>.</li><li>If a justification is required, enter it in the <strong>Comment</strong> field.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/562/1*_4R6jmWDMnKOWgtMD2JnpA.png" /><figcaption>Fig13. Approve / Deny request</figcaption></figure><p>3. Click either <strong>Approve</strong> or <strong>Deny</strong>.</p><p>4. All actions are audited</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1YXnKEcUYWaX9suo--8IrQ.png" /><figcaption>Fig14. Audit logs</figcaption></figure><p>Both approver and requestor receive related information about status request.</p><h3>How to revoke access</h3><p>It might be possible that you will be forced to revoke particular access due to any kind of reason.</p><p>Complete following steps to revoke already granted access:</p><p>To revoke a specific grant made against an entitlement, complete the following instructions:</p><ol><li>Go to the <strong>Privileged Access Manager</strong> page.</li><li>Select the organization, folder, or project you want to revoke grants in.</li><li>Click the <strong>Grants</strong> tab, followed by the <strong>Grants for all users</strong> tab. This contains all grants across all requesters, the grant statuses, and their associated entitlement details.</li><li>In the table, click more_vert <strong>More options</strong> in the same row as a grant you want to revoke.</li><li>To revoke an active grant, click <strong>Revoke grant</strong>.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/335/1*VhP5LRBl6xX-Hlxm2XynoA.png" /><figcaption>Fig15. Revoking access</figcaption></figure><p>To revoke all active grants made against an entitlement, complete the following instructions:</p><ol><li>Go to the <strong>Privileged Access Manager</strong> page.</li><li><a href="https://console.cloud.google.com/iam-admin/pam/entitlements/">Go to Privileged Access Manager</a></li><li>Click the <strong>Entitlements</strong> tab, followed by the <strong>Entitlements for all users</strong> tab. Here you can find the available entitlements, the roles they grant, and their valid requesters and approvers.</li><li>In the table, click more_vert <strong>More options</strong> in the same row as an entitlement you want to revoke the grants for.</li><li>Click <strong>Revoke all grants</strong>.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/387/1*po1AlgzU5R0ggF7bzCeF2g.png" /><figcaption>Fig16. Revoke all access</figcaption></figure><h3>Logs</h3><p>If you need provide logs for auditing purposes or such, you are able to search logs directly from Logs Explorer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LBlIsHEegHdJA5VS7lJF2Q.png" /><figcaption>Fig17. Logs explorer for PAM</figcaption></figure><p>To be able to find logs in Logs Explorer complete following steps:</p><ol><li>Go to Logs Explorer under the project where PAM has been configured</li><li>Use following query to list all logs related with PAM</li></ol><pre>resource.type=&quot;audited_resource&quot;<br>resource.labels.service=&quot;privilegedaccessmanager.googleapis.com&quot;</pre><p>3. Click “Run query”</p><h3>Limitations</h3><ol><li>One and mos important information about PAM is, that service is in Pre-GA, so don’t use this on production before GA release.</li><li>Basic roles aren’t supported.</li><li>Up to 20 roles to be granted on the organization, folder, or project</li><li>Up to 20 valid requesting principals ( particular principals or groups ). Email group participants within a group is no counted in this number.</li><li>You can add up to 20 approving identities per entitlement.</li></ol><p>Do not forget the 👏✌️❤️ if you like this content!</p><p>Also, I will be glad if you hit the follow button so you get notified of my new posts.</p><p>You can also follow me on <a href="https://www.linkedin.com/in/damian-sztankowski-95878b2a8/"><strong>LinkedIn</strong></a><strong>.</strong></p><p>You can join our <a href="https://www.linkedin.com/groups/9824115/"><strong>Google Cloud Community Poland</strong></a> LinkedIn group. It’s open!</p><p>Thank you!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1ed98d6098b3" width="1" height="1" alt=""><hr><p><a href="https://medium.com/google-cloud/setup-temporary-elevated-access-for-google-cloud-with-pam-1ed98d6098b3">Setup Temporary elevated access for Google Cloud with PAM</a> was originally published in <a href="https://medium.com/google-cloud">Google Cloud - Community</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>