소스 검색

fix: update token doc for tenant details, new prosody (#1316)

dev1
Aaron van Meerten 5 년 전
부모
커밋
a3e9f1c39f
No account linked to committer's email address
1개의 변경된 파일5개의 추가작업 그리고 5개의 파일을 삭제
  1. 5
    5
      doc/tokens.md

+ 5
- 5
doc/tokens.md 파일 보기

@@ -18,7 +18,7 @@ The following JWT claims are used in authentication token:
18 18
 - 'iss' specifies *application ID* which identifies the client app connecting to the server. It should be negotiated with the service provider before generating the token.
19 19
 - 'room' contains the name of the room for which the token has been allocated. This is *NOT* full MUC room address. Example assuming that we have full MUC 'conference1@muc.server.net' then 'conference1' should be used here.  Alternately, a '*' may be provided, allowing access to all rooms within the domain.
20 20
 - 'exp' token expiration timestamp as defined in the RFC
21
-- 'sub' contains the name of the domain used when authenticating with this token. By default assuming that we have full MUC 'conference1@muc.server.net' then 'server.net' should be used here.
21
+- 'sub' contains EITHER the lowercase name of the tenant (for a conference like TENANT1/ROOM with would be 'tenant1') OR the lowercase name of the domain used when authenticating with this token (for a conference like /ROOM). By default assuming that we have full MUC 'conference1@muc.server.net' then 'server.net' should be used here.  Alternately, a '*' may be provided, allowing access to rooms in all tenants within the domain or all domains within the server.
22 22
 - 'aud' application identifier. This value indicates what service is consuming the token.  It should be negotiated with the service provider before generating the token.
23 23
 
24 24
 Secret is used to compute HMAC hash value and verify the token for HS256 tokens.  
@@ -27,8 +27,8 @@ Alternately the token may be signed by a private key and authorized via public k
27 27
 
28 28
 ### Token Identifiers
29 29
 
30
-In addition to the basic claims used in authentication, the token can also provide user display information in the 'context' field within the JWT payload:
31
-- 'group' is a string which specifies the group the user belongs to.  Intended for use in reporting/analytics
30
+In addition to the basic claims used in authentication, the token can also provide user display information in the 'context' field within the JWT payload. None of the information in the context field is used for token validation:
31
+- 'group' is a string which specifies the group the user belongs to.  Intended for use in reporting/analytics, not used for token validation.
32 32
 - 'user' is an object which contains display information for the current user
33 33
   - 'id' is a user identifier string.  Intended for use in reporting/analytics
34 34
   - 'name' is the display name of the user
@@ -83,7 +83,7 @@ NOTE: The values in the token shall always be valid values. If you define e.g. t
83 83
 
84 84
 JWT token is currently checked in 2 places:
85 85
 - when user connects to Prosody through BOSH. Token value is passed as 'token' query paramater of BOSH URL. User uses XMPP anonymous authentication method.
86
-- when MUC room is being created/joined Prosody compares 'room' claim with the actual name of the room. This prevents from abusing stolen token by unathorized users to allocate new conference rooms in the system. Admin users are not required to provide valid token which is used by Jicofo for example.
86
+- when MUC room is being created/joined Prosody compares 'room' claim with the actual name of the room. In addition, the 'sub' claim is compare to either the tenant (for TENANT/ROOM URLs) or the base domain (for /ROOM URLs).  This prevents stolen token being abused by unathorized users to allocate new conference rooms in the system. Admin users are not required to provide valid token which is used by Jicofo for example.
87 87
 
88 88
 ### Lib-jitsi-meet options
89 89
 
@@ -126,7 +126,7 @@ Proceed to "Patching Prosody" section to finish configuration.
126 126
 
127 127
 ### Patching Prosody
128 128
 
129
-JWT token authentication requires prosody-trunk version at least 747.
129
+JWT token authentication requires prosody-trunk version at least 747.  JWT tokens with websockets requires prosody 0.11.6 or higher.
130 130
 
131 131
 You can download latest prosody-trunk packages from [here]. Then install it with the following command:
132 132
 

Loading…
취소
저장