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

Sync Challenge Issue #436

Open
markgibbons25 opened this issue Feb 12, 2023 · 0 comments
Open

Sync Challenge Issue #436

markgibbons25 opened this issue Feb 12, 2023 · 0 comments

Comments

@markgibbons25
Copy link

markgibbons25 commented Feb 12, 2023

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
Sync requests via HMAC challenge are failing with 403
Logs:
WARN [Unicorn-Auth] CHAP challenge store removed expired challenge bb19a5e51dcb48a29034b502374356a5.
WARN [Unicorn-Auth] CHAP challenge store rejected bb19a5e51dcb48a29034b502374356a5 because it was unknown.
WARN [Unicorn-Auth] CHAP authentication attempt rejected due to expired or unknown challenge value.

Web DB:
image

If the current behavior is a bug, please provide the steps to reproduce.
Create a sync challenge
Publish /sitecore/templates/System
Try to sync with that challenge or try create any new challenge and sync with that

What is the expected behavior?
Syncs don't fail ;)

Please mention your Sitecore version and Unicorn version.
Sitecore 10.2 Unicorn 4.1.6

Investigation

My investigation found that somehow I'm in the scenario where the Authentication Challenge template has no fields and therefore the Expires field check fails and the challenge gets cleaned up.

Not sure how the DB ended up in this state but perhaps there was a challenge token and then someone did a publish which deleted the fields but not the template.

Suggested fix: in the EnsureTemplateExists() check that the Expires field is on the template, if not recreate it.

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

No branches or pull requests

1 participant