Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: support coturn use-auth-secret TURN auth mode, close #39 #54

Merged
merged 4 commits into from
Nov 30, 2022

Conversation

rg0now
Copy link
Member

@rg0now rg0now commented Nov 30, 2022

Modify the longterm auth handler to implement the whole server-side authentication logic:

  • split the username by the colon delimiter
  • take the first item that looks like an integer (strconv.Atoi is successful)
  • consider this item as a UNIX timestamp defining the expiry of the timestamp
  • fail authentication if the the timestamp is in the past: timestamp < time.Now().Unix()
  • otherwise take the original username, perform the HMAC and return the resultant hash
    Document the changes in doc/AUTH.md and add tests.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 3586742408

  • 13 of 13 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.2%) to 67.775%

Totals Coverage Status
Change from base Build 3586212947: 0.2%
Covered Lines: 734
Relevant Lines: 1083

💛 - Coveralls

@rg0now rg0now merged commit 17775fe into main Nov 30, 2022
@rg0now rg0now deleted the use-auth-secret branch November 30, 2022 20:16
rg0now added a commit that referenced this pull request Dec 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants