Skip to content

Sync Challenge Issue #436

@markgibbons25

Description

@markgibbons25

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions