পদ্ধতি: ব্যক্তিগত কী সাইন
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
একটি মোড়ানো ব্যক্তিগত কী খুলে দেয় এবং তারপর ক্লায়েন্ট দ্বারা প্রদত্ত ডাইজেস্টে স্বাক্ষর করে।
HTTP অনুরোধ
POST https:// KACLS_URL /privatekeysign
KACLS_URL
কী অ্যাক্সেস কন্ট্রোল লিস্ট সার্ভিস (KACLS) URL দিয়ে প্রতিস্থাপন করুন।
পাথ প্যারামিটার
কোনোটিই নয়।
শরীরের অনুরোধ
অনুরোধের অংশে নিম্নলিখিত কাঠামো সহ ডেটা রয়েছে:
JSON প্রতিনিধিত্ব |
---|
{
"authentication": string,
"authorization": string,
"algorithm": string,
"digest": string,
"rsa_pss_salt_length": integer,
"reason": string,
"wrapped_private_key": string
} |
ক্ষেত্র |
---|
authentication | string পরিচয় প্রদানকারী (আইডিপি) দ্বারা জারি করা একটি JWT যা নিশ্চিত করে যে ব্যবহারকারী কে। প্রমাণীকরণ টোকেন দেখুন। |
authorization | string একটি JWT দাবি করে যে ব্যবহারকারীকে resource_name জন্য একটি কী খুলতে দেওয়া হয়েছে। অনুমোদন টোকেন দেখুন। |
algorithm | string খামের এনক্রিপশনে ডেটা এনক্রিপশন কী (DEK) এনক্রিপ্ট করতে যে অ্যালগরিদম ব্যবহার করা হয়েছিল৷ |
digest | string Base64-এনকোডেড বার্তা ডাইজেস্ট। DER এনকোড করা SignedAttributes এর ডাইজেস্ট। এই মান আনপ্যাড করা হয়. সর্বোচ্চ আকার: 128B |
rsa_pss_salt_length | integer (ঐচ্ছিক) ব্যবহার করার জন্য লবণের দৈর্ঘ্য, যদি স্বাক্ষর অ্যালগরিদমটি RSASSA-PSS হয়। স্বাক্ষর অ্যালগরিদম RSASSA-PSS না হলে, এই ক্ষেত্রটি উপেক্ষা করা হয়। |
reason | string (UTF-8) একটি পাসথ্রু JSON স্ট্রিং অপারেশন সম্পর্কে অতিরিক্ত প্রসঙ্গ প্রদান করে। প্রদত্ত JSON প্রদর্শিত হওয়ার আগে স্যানিটাইজ করা উচিত। সর্বোচ্চ আকার: 1 KB। |
wrapped_private_key | string বেস64-এনকোড করা ব্যক্তিগত কী। সর্বোচ্চ আকার: 8 KB। প্রাইভেট কী বা মোড়ানো প্রাইভেট কী-এর বিন্যাস কী অ্যাক্সেস কন্ট্রোল লিস্ট সার্ভিস (KACLS) বাস্তবায়ন পর্যন্ত। ক্লায়েন্ট এবং Gmail এর দিকে, এটি একটি অস্বচ্ছ ব্লব হিসাবে বিবেচিত হয়। |
প্রতিক্রিয়া শরীর
সফল হলে, এই পদ্ধতিটি একটি base64-এনকোডেড স্বাক্ষর প্রদান করে।
অপারেশন ব্যর্থ হলে, একটি কাঠামোগত ত্রুটির উত্তর ফেরত দেওয়া হয়।
JSON প্রতিনিধিত্ব |
---|
{
"signature": string
} |
ক্ষেত্র |
---|
signature | string একটি বেস 64-এনকোডেড স্বাক্ষর। |
উদাহরণ
এই উদাহরণটি privatekeysign
পদ্ধতির জন্য একটি নমুনা অনুরোধ এবং প্রতিক্রিয়া প্রদান করে।
অনুরোধ
{
"wrapped_private_key": "wHrlNOTI9mU6PBdqiq7EQA...",
"digest": "EOBc7nc+7JdIDeb0DVTHriBAbo/dfHFZJgeUhOyo67o=",
"authorization": "eyJhbGciOi...",
"authentication": "eyJhbGciOi...",
"algorithm": "SHA256withRSA",
"reason": "sign"
}
প্রতিক্রিয়া
{
"signature": "LpyCSy5ddy82PIp/87JKaMF4Jmt1KdrbfT1iqpB7uhVd3OwZiu+oq8kxIzB7Lr0iX4aOcxM6HiUyMrGP2PG8x0HkpykbUKQxBVcfm6SLdsqigT9ho5RYw20M6ZXNWVRetFSleKex4SRilTRny38e2ju/lUy0KDaCt1hDUT89nLZ1wsO3D1F3xk8J7clXv5fe7GPRd1ojo82Ny0iyVO7y7h1lh2PACHUFXOMzsdURYFCnxhKAsadccCxpCxKh5x8p78PdoenwY1tnT3/X4O/4LAGfT4fo98Frxy/xtI49WDRNZi6fsL6BQT4vS/WFkybBX9tXaenCqlRBDyZSFhatPQ=="
}
অন্য কিছু উল্লেখ না করা থাকলে, এই পৃষ্ঠার কন্টেন্ট Creative Commons Attribution 4.0 License-এর অধীনে এবং কোডের নমুনাগুলি Apache 2.0 License-এর অধীনে লাইসেন্স প্রাপ্ত। আরও জানতে, Google Developers সাইট নীতি দেখুন। Java হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-08-04 UTC-তে শেষবার আপডেট করা হয়েছে।
[null,null,["2025-08-04 UTC-তে শেষবার আপডেট করা হয়েছে।"],[[["\u003cp\u003eUnwraps a wrapped private key and uses it to sign a provided digest.\u003c/p\u003e\n"],["\u003cp\u003eRequires authentication and authorization tokens for security.\u003c/p\u003e\n"],["\u003cp\u003eAccepts the signing algorithm, digest, salt length (for RSASSA-PSS), reason, and the wrapped private key in the request body.\u003c/p\u003e\n"],["\u003cp\u003eReturns a base64-encoded signature upon successful operation.\u003c/p\u003e\n"],["\u003cp\u003eProvides a structured error reply if the operation fails.\u003c/p\u003e\n"]]],["The `privatekeysign` method unwraps a private key and signs a client-provided digest. It requires a POST request to the `/privatekeysign` endpoint with a JSON body. The body includes `authentication`, `authorization`, `algorithm`, `digest`, `rsa_pss_salt_length` (optional), `reason`, and the `wrapped_private_key`. Upon success, a JSON response containing a base64-encoded `signature` is returned; otherwise, a structured error reply is returned.\n"],null,["# Method: privatekeysign\n\nUnwraps a wrapped private key and then signs the digest provided by the client.\n\n### HTTP request\n\n`POST https://`\u003cvar translate=\"no\"\u003eKACLS_URL\u003c/var\u003e`/privatekeysign`\n\nReplace \u003cvar translate=\"no\"\u003eKACLS_URL\u003c/var\u003e with the Key Access Control List\nService (KACLS) URL.\n\n### Path parameters\n\nNone.\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation ||\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| ``` { \"authentication\": string, \"authorization\": string, \"algorithm\": string, \"digest\": string, \"rsa_pss_salt_length\": integer, \"reason\": string, \"wrapped_private_key\": string } ``` |\n\n| Fields ||\n|-----------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `authentication` | `string` A JWT issued by the identity provider (IdP) asserting who the user is. See [authentication tokens](/workspace/cse/reference/authentication-tokens). |\n| `authorization` | `string` A JWT asserting that the user is allowed to unwrap a key for `resource_name`. See [authorization tokens](/workspace/cse/reference/authorization-tokens). |\n| `algorithm` | `string` The algorithm that was used to encrypt the Data Encryption Key (DEK) in envelope encryption. |\n| `digest` | `string` Base64-encoded message digest. The digest of the DER encoded `SignedAttributes`. This value is unpadded. Max size: 128B |\n| `rsa_pss_salt_length` | `integer` (Optional) The salt length to use, if the signature algorithm is RSASSA-PSS. If the signature algorithm is not RSASSA-PSS, this field is ignored. |\n| `reason` | `string (UTF-8)` A passthrough JSON string providing additional context about the operation. The JSON provided should be sanitized before being displayed. Max size: 1 KB. |\n| `wrapped_private_key` | `string` The base64-encoded wrapped private key. Max size: 8 KB. The format of the private key or the wrapped private key is up to the Key Access Control List Service (KACLS) implementation. On the client and on the Gmail side, this is treated as an opaque blob. |\n\n### Response body\n\nIf successful, this method returns a base64-encoded signature.\n\nIf the operation fails, a\n[structured error reply](/workspace/cse/reference/structured-errors)\nis returned.\n\n| JSON representation ||\n|---------------------------------|---|\n| ``` { \"signature\": string } ``` |\n\n| Fields ||\n|-------------|--------------------------------------|\n| `signature` | `string` A base64-encoded signature. |\n\n### Example\n\nThis example provides a sample request and response for the `privatekeysign`\nmethod.\n\n#### Request\n\n {\n \"wrapped_private_key\": \"wHrlNOTI9mU6PBdqiq7EQA...\",\n \"digest\": \"EOBc7nc+7JdIDeb0DVTHriBAbo/dfHFZJgeUhOyo67o=\",\n \"authorization\": \"eyJhbGciOi...\",\n \"authentication\": \"eyJhbGciOi...\",\n \"algorithm\": \"SHA256withRSA\",\n \"reason\": \"sign\"\n }\n\n#### Response\n\n {\n \"signature\": \"LpyCSy5ddy82PIp/87JKaMF4Jmt1KdrbfT1iqpB7uhVd3OwZiu+oq8kxIzB7Lr0iX4aOcxM6HiUyMrGP2PG8x0HkpykbUKQxBVcfm6SLdsqigT9ho5RYw20M6ZXNWVRetFSleKex4SRilTRny38e2ju/lUy0KDaCt1hDUT89nLZ1wsO3D1F3xk8J7clXv5fe7GPRd1ojo82Ny0iyVO7y7h1lh2PACHUFXOMzsdURYFCnxhKAsadccCxpCxKh5x8p78PdoenwY1tnT3/X4O/4LAGfT4fo98Frxy/xtI49WDRNZi6fsL6BQT4vS/WFkybBX9tXaenCqlRBDyZSFhatPQ==\"\n }"]]