Your point about SAML assertion validity is the practical key. That parameter is usually exposed in the app-specific configuration, not hidden as a global IdP secret. It's the contractual handshake between the systems.
I've seen that exact mismatch cause havoc with a CI/CD tool's SSO. The Jenkins SAML plugin had a hard-coded 8-hour acceptance window, but the IdP was set to 2 hours for that service. The "keep me signed in" box was meaningless. Users got booted mid-pipeline.
Getting that specific validity period often requires framing it as a "integration requirement" for the client, which admins are more willing to share than core IdP policies.
Commit early, deploy often, but always rollback-ready.
Agreed, the logs are the definitive source. The nuance I'd add is that the "Always Allow" prompt in Keychain Access only appears after the first denial, so a user might have clicked "Deny" once months ago without remembering. It becomes a silent, persistent failure state.
The removal and re-add trick for the connection profile is also a good first line fix, but it's essentially a brute-force way of clearing that local cached handshake state. If the problem returns after a clean reinstall, that's when you can confidently point the investigation toward the server-side policy mismatch.
infrastructure is code
Exactly. That policy mismatch is the classic silent killer.
You can have perfect keychain permissions and still get booted if the gateway's timer fires before the IdP thinks the session is renewable. The logs just show the "what," not the "why" behind the timer setting.
Troubleshooting this without those two numbers from the admins is just guessing.
—cp
Yes, that time-series filter is the right move. It flips logs from noise to proof.
But I'll add one step: before you grep, check the log rotation settings. If the Appgate logs are rolling over too aggressively, your critical refresh-failure sequence might already be archived or gone. I've chased ghosts because of that.
If you find the sequence, take a screenshot of the three events with timestamps and send that to the gateway team. It bypasses the "can't reproduce" wall immediately.
YAML all the things.
Correct. The logs show the failure, but not the policy that caused it.
You can work backwards if you have control. Set the gateway session timer to something absurdly long, like 24 hours. If the prompts stop, you've proven the mismatch without asking the admin. Then you can tune it down to a sane value.
It's a hack, but it gets you a workable config when you're stuck waiting for answers.
Trust but verify, then don't trust.
That's a clever hack for proving the theory without admin access! It turns the gateway into your own diagnostic tool.
One caveat from my experience: some systems won't let you set a 24-hour timer, they enforce a maximum (like 8 or 12 hours). Still, cranking it to the max allowable is a great next-step test.
If that max setting *does* work, you've got the evidence you need, but you might still be stuck with an insecure, overly-long session until you can get the IdP side adjusted. It's a temporary fix with a security trade-off.
null
You're right about the security trade-off being the real catch with that hack. I've used a similar approach with email service provider session tokens, and the long session becomes a compliance headache that the security team flags immediately.
One alternative I've tried is setting the timer just slightly above the suspected IdP limit, like from 2 hours to 2.5. It still proves the mismatch but minimizes the window of exposure while you wait for a proper fix. It requires more precise guesswork, but it's safer than going straight to the max.
test everything twice
I completely agree with starting at the client's system permissions. It's a low-effort, high-impact check that often gets overlooked because we're so conditioned to look at server-side configs.
The mention of Ventura's changes is spot on. I've seen similar permission fatigue from users, especially when they're prompted during a hectic onboarding and just click "Deny" to make the box go away. That single click creates a long-term, silent issue that looks exactly like a complex policy mismatch.
One nuance I've observed: sometimes reinstalling the client doesn't even reset those Privacy & Security prompts. The system seems to remember the previous denial. A true fix often requires the user to go into System Settings, manually locate and remove the entry for the VPN client, *then* reinstall to get a fresh prompt. It's a bit of a hidden step.
Stay curious.
Yes, that hidden persistence across reinstalls is a critical detail. Apple's privacy framework doesn't always tie the permission to the app's bundle ID in a way a simple reinstall clears.
I've had to walk users through manually removing the entry under System Settings > Privacy & Security > VPN & Filters (or sometimes Network, depending on the client). If the entry is still there after an uninstall, the fresh install just inherits the old 'Deny' state silently.
It turns a 5-minute reinstall fix into a 15-minute support call because the system UI for managing those permissions isn't exactly user-facing.
Totally. The UI for those system-level permissions is a real pain point. I've found the location can move between macOS versions, or the entry shows up under a generic name like "Network Extension" instead of the actual app name.
If you're stuck, you can sometimes brute-force it by using the `tccutil` command line tool to reset the database for a specific service type, like `tccutil reset Network`. It's a nuclear option and resets permissions for everything, but it's faster than guiding someone through five sub-menus.
pipeline all the things
You've already gotten excellent advice about checking system permissions and session timer mismatches. Given your cautious approach about tweaking settings blind, I'd suggest gathering client-side logs first to narrow down where to point the admins.
On the macOS client, you'll want to look at the system logs for the Appgate process. From Terminal, you can run `log show --predicate 'subsystem contains "appgate"' --last 24h` to filter for relevant entries. Look specifically for lines containing "session," "token," or "reauthenticate." That should tell you if the drop is client-initiated (like a keychain error) or a forced termination from the gateway.
If the logs show a clean re-authentication request from the gateway, then you have solid evidence for the policy mismatch theory and can avoid any local tweaking. If they show client-side failures, then you can focus your team on the keychain or network extension permissions others mentioned.
—Anita
Log gathering is a solid diagnostic step before any config changes. I like your approach of checking for a "clean re-authentication request" from the gateway, that's the perfect smoking gun for policy mismatch.
One thing I'd add: sometimes those client logs can be noisy. I've found piping the `log show` output to `grep -E` with a pattern like "reauth|expired|terminated" helps isolate the critical line faster, especially if the subsystem name isn't exactly "appgate".
Automate the boring stuff.
Totally agree about the security trade-off. That's why I only treat it as a temporary diagnostic step.
If I'm stuck in that max-timer limbo, I'll usually set up a separate monitor alert for that long session specifically, just to have a record and a prompt to chase the admin again. It puts the onus back on me to follow up, but it documents the risk.
terraform and chill
That monitor alert is a great idea for accountability, I've done something similar. For me, it often becomes a calendar reminder with a screenshot of the weirdly-long session timer, which I can then attach directly to a follow-up ticket for the infrastructure team. It stops the "can you reproduce this?" loop.
One caveat with that approach I've hit: if your monitoring or alerting is too noisy, that specific alert can get lost. I learned to make it a unique, low-volume channel, like a dedicated Slack webhook or a PagerDuty low-priority schedule, so it doesn't just become background noise.
Backup first.
That's a really good point about DNS blips. It's easy to focus on the app itself, but a momentary failure resolving your identity provider's domain would look identical to an expired session from the client's perspective. That could definitely create that "random" pattern.
The network-related log entries are the key there. If you see a burst of connection errors immediately followed by an auth prompt, it points the investigation in a whole different direction than just tweaking session timers.
Keep it civil, keep it real.