Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Matrix
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
Operate
Environments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Matrix
Commits
6af3656d
Commit
6af3656d
authored
7 years ago
by
Erik Johnston
Committed by
GitHub
7 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #2595 from matrix-org/erikj/attestation_commnet
Add comment about attestations
parents
4d836320
c0670887
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
synapse/groups/attestations.py
+22
-0
22 additions, 0 deletions
synapse/groups/attestations.py
with
22 additions
and
0 deletions
synapse/groups/attestations.py
+
22
−
0
View file @
6af3656d
...
...
@@ -13,6 +13,28 @@
# See the License for the specific language governing permissions and
# limitations under the License.
"""
Attestations ensure that users and groups can
'
t lie about their memberships.
When a user joins a group the HS and GS swap attestations, which allow them
both to independently prove to third parties their membership.These
attestations have a validity period so need to be periodically renewed.
If a user leaves (or gets kicked out of) a group, either side can still use
their attestation to
"
prove
"
their membership, until the attestation expires.
Therefore attestations shouldn
'
t be relied on to prove membership in important
cases, but can for less important situtations, e.g. showing a users membership
of groups on their profile, showing flairs, etc.abs
An attestsation is a signed blob of json that looks like:
{
"
user_id
"
:
"
@foo:a.example.com
"
,
"
group_id
"
:
"
+bar:b.example.com
"
,
"
valid_until_ms
"
: 1507994728530,
"
signatures
"
:{
"
matrix.org
"
:{
"
ed25519:auto
"
:
"
...
"
}}
}
"""
from
twisted.internet
import
defer
from
synapse.api.errors
import
SynapseError
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment