मुख्य सामग्री पर जाएँ

SaaS organization invite सुरक्षा: सुरक्षित link, role और expiry

Authorized sender, tenant-bound one-time token, role review, सुरक्षित acceptance और lifecycle tests से SaaS team invitations सुरक्षित करें।

इस मार्गदर्शिका में

SaaS organization invitation सुरक्षित कैसे करें?

Invitation किसी व्यक्ति को customer organization में आने का रास्ता देती है, इसलिए यह साधारण email नहीं बल्कि authorization workflow है। जाँचें कि inviter member जोड़ सकता है और माँगा गया role दे सकता है। Invite को एक tenant और intended email से बाँधें तथा short-lived, single-use token रखें। Acceptance पर invitation state फिर जाँचकर membership change atomic तरीके से करें।

Inviter को authorize करें और दिया जा सकने वाला role सीमित रखें

Server पर inviter की current tenant membership और permission जाँचें। Member, billing, security और tenant-owner roles अलग रखें; स्पष्ट policy के बिना inviter अपने अधिकार से ऊँचा role न दे सके। Owner या administrator invite के लिए stronger confirmation रखें और जहाँ जरूरी हो approval का कारण दर्ज करें।

Invitation को tenant, email और स्पष्ट role से बाँधें

Tenant ID, normalized target email, role, inviter, creation time, expiry और status server-side save करें। Recipient link खोले तब URL से tenant ID या privileged role न लें। Email या role बदलना हो तो पुराना invite revoke करें और fresh approval के साथ नया बनाएँ।

High-entropy token बनाएँ जो expire हो और एक बार ही चले

Cryptographic random generator से unpredictable token बनाएँ, जहाँ व्यावहारिक हो plaintext token के बजाय verifier या hash store करें और छोटी expiry रखें। HTTPS पर redeem करें और atomic state change से उसे consume करें ताकि concurrent requests एक invite को दो बार स्वीकार न कर सकें। Raw token को routine logs या analytics से बाहर रखें।

इस बिंदु के स्रोत: OWASP Forgot Password Cheat SheetOWASP Session Management Cheat Sheet
Organization invitation controls worksheet
Invite state और tenantInviter permissionRecipient और roleToken expiry/revocationAtomic acceptance test owner
New member
Administrator या owner
Expired या revoked invite

Invitation email और acceptance को कैसे सुरक्षित रखें?

Acceptance link configured origin से बनाएँ

Invitation URL बनाते समय incoming Host header के बजाय server-configured, verified product origin लें। Open redirect, token पाने वाले tracking pixel और redemption page पर third-party analytics से बचें। ऐसा referrer policy रखें जो token दूसरे origin को न भेजे; संभव हो तो validate करने के बाद address bar से token हटा दें।

इस बिंदु के स्रोत: Testing for Host Header InjectionOWASP Forgot Password Cheat Sheet

Recipient verify करें और मिलने वाला access साफ बताएँ

Email में invited address और organization पहचानने योग्य रखें, role बताएँ और join करने से पहले recipient से authenticate या email control verify कराएँ। Forwarded link खोलने वाले को intended recipient का प्रमाण न मानें। Unexpected invitation अस्वीकार या report करने का सुरक्षित रास्ता दें, जो account existence उजागर न करे।

इस बिंदु के स्रोत: Creating user accounts as administratorOWASP Authentication Cheat Sheet

Existing account और account switching सावधानी से संभालें

Recipient के पास login हो तो sign in कराकर स्पष्ट रूप से नामित organization join कराएँ; email text match होने से active tenant silently बदलें या identity merge न करें। Browser गलत account में signed in हो तो साफ confirmation दिखाएँ। Membership creation और audit record एक transaction में रखें।

Invitation lifecycle को कैसे चलाएँ और test करें?

Revoke, resend, expiry और role changes का स्पष्ट तरीका रखें

Administrator unused invite revoke कर सके और देख सके कि किसने किस tenant और role के लिए invite किया तथा कब expire होगा। Resend पुराना token बिना policy के extend न करे। Role या recipient बदले तो token invalidate करें और नया invite बनाएँ; दोनों actions दर्ज करें।

Abuse, enumeration और simultaneous acceptance जाँचें

Expired, revoked, malformed, used और cross-tenant token आजमाएँ। एक साथ दो acceptance requests भेजें और सुनिश्चित करें केवल एक membership बने। Unknown email, existing user और invalid token के responses की तुलना करें ताकि unauthenticated caller customer या member enumerate न कर सके। Invite create तथा redeem सीमित करें, पर सामान्य onboarding बाधित न हो।

Token log किए बिना authorization decision audit करें

Inviter, tenant, recipient reference, role, approval, token ID या hashed identifier, expiry, acceptance result और timestamps दर्ज करें। Audit access सीमित रखें और असामान्य burst, बार-बार owner invite या privileged action से ठीक पहले बने invite पर alert दें। Raw acceptance URL या token कभी log न करें।

SaaS organization invitation सुरक्षा के सवाल

क्या invitation link से administrator access अपने-आप देना चाहिए?

केवल तब जब अलग से authorized policy उसी role को स्पष्ट रूप से देती हो। Role server-side तय करें, inviter authority सीमित रखें और जरूरत पर high-impact access के लिए अतिरिक्त approval लें।

इस बिंदु के स्रोत: OWASP Cheat Sheet: authorization

Invitation token कितनी देर valid रहना चाहिए?

Customer workflow के लिए जितनी छोटी व्यावहारिक अवधि हो वही रखें और expiry दिखाएँ। Role या recipient बदलने पर पुराना token revoke करके नया बनाएँ; token अनिश्चित समय तक valid न रहे।

इस बिंदु के स्रोत: OWASP Forgot Password Cheat Sheet

क्या दूसरे user के रूप में signed in रहते invite accept किया जा सकता है?

Recipient intended account से authenticate करे और नामित tenant को स्पष्ट रूप से join करे। Signed-in identity invite policy से मेल न खाए तो membership silently जोड़ने के बजाय account बदलने को कहें।

क्या केवल email भेजना tenant join करने का प्रमाण है?

नहीं। Email delivery channel है। Membership दर्ज करने से पहले application token, tenant, intended recipient, expiry, inviter authority और role सब validate करे।

इस बिंदु के स्रोत: Creating user accounts as administratorOWASP Cheat Sheet: authorization