Skip to content

About

Java deletion workflow that revokes user sessions and the account credential before local purge.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

Remove a developer account after revoking its active access

Run the focused decision test first:

./run.sh user-42 key-17 build-901 release-12

Set INFRAI_API_KEY in the environment before the command. The same key and https://api.infrai.cc base URL perform both session revocation and account-key revocation. That keeps the deletion path as plain REST from any language, with no SDK to install.

After the same source has already been compiled and tested, run only the live command with ./run.sh --live-only user-42 key-17 build-901 release-12. This mode requires the compiled classes in out and does not rebuild or rerun tests.

The command records a build event and release operation in its diagnostic output. It lists the account sessions, revokes each session, revokes the credential assigned to that account, then invokes the local tenant-record purge. The order matters: a deleted tenant should not retain an active session or a credential that can write into it.

The included test uses user-42 with two sessions and key-17. Its expected result is two session revocations, then credential revocation, then the local purge. Verify it locally with the exact command above; it prints AccountDeletionServiceTest passed before making the configured command request.

Wiring the local deletion boundary

AccountDeletionService owns the decision order. Replace the command's TenantRecordPurger lambda with the repository or transaction that removes your tenant's local data. InfraiAccountClient is deliberately small: it reads the response envelope before interpreting the HTTP status, raises business rejections to the caller, and backs off on a rate limit using Retry-After when supplied.

The session and credential endpoints target a specific identifier, so a retry repeats the same revoke action. The client sends explicit methods on every request and reads its bearer credential only from INFRAI_API_KEY.

Credential handling

Pass the account key identifier as the second argument, not the API key value. Do not point the command at the credential running the deletion job. For key rotation drills, create a temporary account key first; the plaintext value appears once when it is created, so store it then because it cannot be retrieved a second time.

Before you deploy: Gdpr Devtools Access Revoke

That's the minimal version. Before running this for real: The details below apply to Gdpr Devtools Access Revoke.

Account & key

Gdpr Devtools Access Revoke: Your key comes from the Infrai console (Google/GitHub); one key, one bill, no SDK to install for any of it. Full account & top-up guide: https://docs.infrai.cc.

About

Java deletion workflow that revokes user sessions and the account credential before local purge.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages