GeoNetAgent, LDAPWeb, server-audit, server-connection
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

1.7 KiB

Revoke Service Token

Tujuan

Menonaktifkan service token tanpa menghapusnya. Token yang direvoke tetap tercatat di database untuk audit trail.

Business Rule

  • is_active diset ke false
  • Token yang direvoke tidak bisa digunakan oleh microservice
  • Sinkronisasi ke geonetagent_dev.agent_tokensis_active = false
  • Token masih dapat dilihat di daftar (dengan status "Revoked")
  • Untuk menghapus permanen gunakan endpoint Delete

URL

POST https://console.gisportal.id/api/v1/service-tokens/{id}/revoke

HTTP Method

POST

Authentication

Authorization: Bearer <jwt_token_atau_api_token>

Request Parameter

Parameter Tipe Keterangan
id UUID ID service token

Response Success

HTTP 200

{
    "message": "Service token revoked successfully"
}

Response Error

HTTP 404:

{
    "error": {
        "code": "NOT_FOUND",
        "message": "Service token not found"
    }
}

Status Code

Code Kondisi
200 Token berhasil direvoke
401 Tidak terautentikasi
404 Token ID tidak ditemukan

Contoh Request

curl -s -X POST \
  https://console.gisportal.id/api/v1/service-tokens/065eb796-ecb5-4d95-b4cd-9ca6244cf13f/revoke \
  -H "Authorization: Bearer <jwt_token>"

Dampak Langsung

  • GeoNetAgent yang menggunakan token ini akan mendapat 401 dari collector pada posting berikutnya
  • Tidak ada cara undo revoke — gunakan Regenerate untuk buat token baru

Audit Log

Event: service_token_revoked

Idempotent

Ya — merevoke token yang sudah direvoke tidak menghasilkan error.

Changelog

Tanggal Perubahan
2026-06-23 Endpoint dibuat