Skip to content
Notifications
Clear all

Showcase: How we gave our auditors temporary, logged access.

27 Posts
27 Users
0 Reactions
34 Views
(@devops_rookie_2025)
Prominent Member
Joined: 4 months ago
Posts: 467
Topic starter   [#27016]

Hey everyone! 👋 We just went through our annual security audit and I wanted to share how we used Perimeter 81 to solve a specific access problem.

Our auditors needed temporary, read-only access to a few servers in our private cloud for about a week. We obviously needed full logging and no persistent credentials. Here's the basic Terraform snippet we used to create a dedicated user group with time-bound access. It felt like magic!

```hcl
resource "perimeter81_group" "auditor_access_2025_q1" {
name = "auditors-temp-2025q1"
policy_type = "Default"

user_ids = [
perimeter81_user.auditor_user_1.id,
perimeter81_user.auditor_user_2.id
]

time_settings {
start_date = "2025-03-01T09:00:00Z"
end_date = "2025-03-07T18:00:00Z"
}
}
```

The best part was the Activity Log in the portal. We could see every connection timestamp, duration, and target resource. When the audit was done, we just disabled the group. Has anyone else set up something similar? I'd love to hear if there are better ways to handle the user onboarding partβ€”our process was a bit manual. Thanks!



   
Quote
(@hiroshim)
Noble Member
Joined: 3 months ago
Posts: 767
 

Your approach with a dedicated, time-bound group is sound. However, I'd be interested to see the underlying resource policies. The Terraform snippet shows the group, but the critical control is the `Default` policy type attached to it. In our similar setup, we had to explicitly define a zero-trust rule set for that group that only allowed specific bastion hosts as gateways and enforced read-only commands via SSH command filtering.

> I'd love to hear if there are better ways to handle the user onboarding part.

We automated that with a small internal web form tied to our IDP. It generated a temporary user object, sent a just-in-time enrollment link to the auditor's email, and automatically added the user ID to the relevant group resource in Terraform state. This eliminated the manual account creation step. Did you consider the logging granularity for data access, or was it purely connection logging?



   
ReplyQuote
(@hugob)
Estimable Member
Joined: 2 months ago
Posts: 196
 

I love this approach! Seeing the exact Terraform snippet is super helpful, as I'm always looking for real-world examples of time-bound access. The activity log part you mentioned is key, it turns a necessary security step into actionable data.

You asked about better onboarding. We hit the same manual bottleneck last year and ended up building a tiny Zapier zap as a stopgap. It triggers when our IT ticketing system creates a request tagged "auditor access", grabs the email and dates, and uses Perimeter81's API to provision the temporary user directly. It's not perfect, but it cut our setup time from an hour to about two minutes and eliminated typos. The next step for us is hooking it into our IDP like user1018 mentioned.

Have you looked at whether the activity logs can be streamed out to something like a SIEM or even a simple cloud log? I'm curious about keeping an immutable record after the group is disabled.


hugo


   
ReplyQuote
(@budget_buyer_99)
Honorable Member
Joined: 4 months ago
Posts: 359
 

Zapier's a good hack for speed, but doesn't that just add another paid tool into the mix? I'd be worried about the cost creeping up for a once-a-year process.

On the logs, that's my main question too. If the audit is over and the group is gone, can you still get to the logs later without paying extra for extended retention? I need that record to exist cheaply after the fact.



   
ReplyQuote
(@clara12)
Estimable Member
Joined: 3 months ago
Posts: 210
 

You're right to focus on the underlying policies. We had a similar experience where the default group policy wasn't restrictive enough by itself, particularly for database auditing. We ended up layering on separate session recording for our PostgreSQL instances because the standard connection logs didn't capture the actual queries they were running, which was a requirement for our compliance framework.

Your IDP integration sounds like the ideal end state. Did you run into any issues with just-in-time enrollment links expiring before the external auditors completed their initial login? We've had problems with email delays causing link timeouts.



   
ReplyQuote
(@greentea)
Reputable Member
Joined: 2 months ago
Posts: 241
 

The point about session recording for database queries is crucial. Standard network logs often miss the intent, which creates a compliance gap. We faced this too, but with a different toolset. Our solution was to configure the PostgreSQL audit extension (pgAudit) to log all SELECT statements during the audit window, then pipe those logs to our SIEM. It added overhead, but the audit trail was undeniable.

On the JIT link timeout issue, we did encounter that. We set our IDP's enrollment link validity to 72 hours instead of the default 24, which solved most delays. However, that does increase the attack window slightly, so we made sure those links were only sent over encrypted internal channels. Have you considered adjusting the timeout as a simple fix, or is the concern more about the security trade-off?



   
ReplyQuote
(@danielz)
Estimable Member
Joined: 2 months ago
Posts: 171
 

Good point on the logs. The streaming piece is critical. Perimeter81's API can push activity logs to an S3 bucket we own. That way, the logs persist in our control after the group and even the users are gone. The audit trail doesn't vanish when you tear down the access.


show me the logs


   
ReplyQuote
(@derekf)
Reputable Member
Joined: 3 months ago
Posts: 285
 

Your Terraform snippet is a solid foundation for managing ephemeral access, but the real security and compliance value is determined by the `Default` policy attached to that group. In our setup, we had to explicitly define that policy to enforce session recording and command logging, as the default often only logs connection metadata.

For onboarding, we automated it by extending the Perimeter81 provider with a custom module. When our ticketing system creates a Jira ticket with a specific label, a Terraform Cloud run is triggered. It uses the Perimeter81 API to create the temporary user, generates a time-sensitive enrollment link, and posts it directly into the ticket as a private comment. This eliminated manual steps while keeping the process within our IaC framework.

Have you reviewed the specific policy rules applied to that group? The difference between a simple connection log and a full session recording can be significant for certain compliance requirements.


No free lunch in cloud.


   
ReplyQuote
(@davidn)
Reputable Member
Joined: 3 months ago
Posts: 305
 

The time-bound group is a clean approach for ephemeral access. Your question about onboarding is the right one to ask, as that's where most manual bottlenecks happen.

We've found that even with a solid group policy, the user creation itself needs to be part of the IaC flow. We now define the auditor as a Terraform module input, which creates the user and group in a single apply. This keeps everything version-controlled and avoids console work.

On the logging you mentioned, did you confirm that the `Default` policy logs at the command/query level for your specific resources, or just connection events? That distinction often becomes clear only during the audit itself.


Measure twice, buy once.


   
ReplyQuote
(@amyt5)
Reputable Member
Joined: 2 months ago
Posts: 295
 

Your example with the time-bound group is a great starting point. I completely agree that the manual onboarding is the part that always feels clunky.

You mentioned using the portal's Activity Log, which is good for a quick view. But for a proper audit trail, you'll want to export those logs to your own storage. We set up a simple automation to pipe Perimeter81's activity logs into a dedicated S3 bucket right when the group is created. That way, we own the data forever, even after the temporary users and group are deleted at the end of the week.

For onboarding, tying it to your ticketing system is the way to go. Even a simple script that triggers off a ticket creation can automate the user provisioning and drop the enrollment link into the ticket as a private comment. It keeps everything documented without any manual copy-pasting. Have you looked at what system your audit requests already come through?


Clean data, happy life.


   
ReplyQuote
(@gregr)
Reputable Member
Joined: 3 months ago
Posts: 343
 

Exporting logs to a controlled S3 bucket is a smart move for long-term retention. It solves the immediate issue, but creates another data lifecycle to manage. You'll want to define an object lifecycle policy on that bucket early, or you'll just be storing audit logs for a one-week engagement in perpetuity. I set ours to transition to Glacier after 90 days and expire after 7 years, which matches our compliance requirements without bloating storage costs.

On the ticketing system trigger, that's definitely the pattern. The key nuance is whether the script creates the infrastructure directly or just kicks off a Terraform run. We tried both. Direct API calls from the script are faster, but you lose the state file as your source of truth. Having the ticket trigger a Terraform Cloud run, like user1218 mentioned, adds a few seconds but keeps everything in the IaC fold, which we found was worth it for the audit trail of the provisioning itself. Did you go with a direct API script or an IaC trigger?


throughput first


   
ReplyQuote
(@datadog_dave_3)
Reputable Member
Joined: 5 months ago
Posts: 359
 

The lifecycle policy point is critical and often overlooked. We follow a similar pattern, but with a key difference: we stream directly to a dedicated log archive in Datadog, not S3. This keeps the audit trail within the same platform as our other operational logs, and we apply a separate retention filter to that archive (1 year hot, 7 years cold) so it doesn't interfere with our standard log retention settings. The cost profile is predictable and it eliminates managing a separate S3 bucket lifecycle.

On your question about direct API vs IaC trigger, we always go with the IaC trigger. The extra few seconds are irrelevant for an audit process, and having the entire provisioning event itself logged in Terraform Cloud's run history is a non-negotiable part of our own audit trail. It proves the access was created as code, not via an ad-hoc script that leaves no immutable record.


null


   
ReplyQuote
(@consultant_mark)
Reputable Member
Joined: 5 months ago
Posts: 231
 

You're spot on about the value of streaming logs out for immutability. The Perimeter81 API can indeed push to an external destination like an S3 bucket or a syslog server. However, that's just the first step.

The real strategic consideration is the total cost of ownership for that log pipeline. If you're just dumping to a cloud bucket, you've created a separate data silo that now needs its own governance, retention policies, and query tooling for future audit reviews. We found it more operationally sound to stream directly into our existing SIEM (we use Splunk). This way, the auditor activity logs are correlated with our other identity events from the IDP and network flows, and we apply our organization-wide retention rules automatically. It avoids building a one-off process.

On the Zapier stopgap, that's a pragmatic step, but moving to an IaC trigger from the ticketing system, as others mentioned, is the logical next step for governance. The typo elimination is a real benefit, but the audit trail of *how* the user was provisioned is just as important as their activity logs. Does your current Zapier flow create any immutable record of the provisioning request and its parameters?



   
ReplyQuote
(@git_ops_guy)
Reputable Member
Joined: 6 months ago
Posts: 399
 

Totally agree on steering logs into your SIEM rather than a separate bucket. It solves the governance problem by using existing retention rules.

But doesn't that create a chicken-and-egg scenario? You need the logging pipeline fully operational *before* you can grant any access for an audit. If your SIEM integration is broken or backlogged, provisioning is blocked. With a simple S3 dump, you can get the logs started instantly and worry about parsing them later. We usually do both for a short time.


git push and pray


   
ReplyQuote
(@charlie9)
Reputable Member
Joined: 3 months ago
Posts: 284
 

Good luck with that "simple automation" to pipe logs. Every time I've seen that phrase in a requirements doc, it's meant weeks of debugging API rate limits and IAM policies.

You say you own the data forever in S3. True, but that's just moving the problem. Now you own the cost forever too, and the compliance burden of securing that bucket. It's not a solution, it's a cost transfer.


Show me the TCO.


   
ReplyQuote
Page 1 / 2