Skip to content

Sessions can register from a subdomain without .well-known config? #239

@snandy-ts

Description

@snandy-ts

We're looking into how to configure our .well-known JSON so that subdomains of our origin can register new site-scoped sessions. However, the behavior we're seeing for registration doesn't seem to align with our expectations based on the spec.

Our .well-known config is currently empty, but we're able to register a site-scoped session for example.com from abc.example.com. We expected to need to list the subdomain as one of the registering_origins in the .well-known JSON. We're using appropriate root eTLD+1 origin and include_site=true values in our session config; furthermore, deleting the appropriate cookie and refreshing the page allows us to refresh the session in a call to https://abc.example.com/dbsc/refresh, which (alongside the browser histograms) confirms sessions are being recognized, registered, and refreshed.

Question: Is this behavior expected (i.e., should subdomains be able to register a site-scoped session for the eTLD+1 without being explicitly opted-in via the .well-known JSON)? Or should registration be blocked unless the subdomain appears in registering_origins field of the JSON?

I've copied some information about our session registration header and our session config below for reference.

Session registration header:

Secure-Session-Registration: (ES256 RS256); path="https%3A%2F%2Fabc.example.com%2Fdbsc%2Fstart"; challenge="challenge-value"

Response from https://abc.example.com/dbsc/start:

{
    "session_identifier":"1234",
    "refresh_url":"/dbsc/refresh",
    "scope":{
        "origin":"https://example.com/",
        "include_site":true
    },
    "credentials":[{
        "type":"cookie",
        "name":"cookie-name",
        "attributes":"Path=/; Domain=.example.com; Secure; HttpOnly; SameSite=Lax"
    }]
}

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