Skip to content
This repository has been archived by the owner on May 29, 2024. It is now read-only.

Feature/disable cookie wildcard #68

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/source/start.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2151,6 +2151,12 @@ security.cookie_domain
Defaults to the current domain and all subdomains (is automatically determined by the
server). The scope of the cookie will bound to a specific domain.

security.cookie_domain_wildcard
Defaults to `true` An auth_tkt cookie will be generated for the
wildcard domain. If your site is hosted as example.com this will make
the cookie available for sites underneath example.com such as
www.example.com.

security.cookie_name
Defaults to 'auth_tkt'. Needs to be set in case you have multiple
ringo applications on the same server.
Expand Down
2 changes: 2 additions & 0 deletions ringo/lib/security.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ def setup_ringo_security(config):
domain = settings.get("security.cookie_domain")
httponly = settings.get("security.cookie_httponly", "false") == "true"
cookie_name = settings.get("security.cookie_name", "auth_tkt")
wild_domain = settings.get("security.cookie_domain_wildcard", "true") == "true"
authn_policy = AuthTktAuthenticationPolicy(secret,
secure=secure,
hashalg='sha512',
Expand All @@ -171,6 +172,7 @@ def setup_ringo_security(config):
include_ip=include_ip,
path=path,
domain=domain,
wild_domain=wild_domain,
http_only=httponly,
cookie_name=cookie_name)
authz_policy = ACLAuthorizationPolicy()
Expand Down