{"id":13805988,"url":"https://github.com/mozilla-services/pyramid_ipauth","last_synced_at":"2026-01-14T07:14:17.446Z","repository":{"id":62582913,"uuid":"2609602","full_name":"mozilla-services/pyramid_ipauth","owner":"mozilla-services","description":"INACTIVE - http://mzl.la/ghe-archive - a pyramid authentication policy based on remote ip address","archived":true,"fork":false,"pushed_at":"2020-03-28T20:42:31.000Z","size":39,"stargazers_count":11,"open_issues_count":0,"forks_count":5,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-09-29T07:16:52.768Z","etag":null,"topics":["inactive","unmaintained"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mozilla-services.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGES.txt","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-10-19T22:36:59.000Z","updated_at":"2024-07-23T14:05:03.000Z","dependencies_parsed_at":"2022-11-03T21:37:12.645Z","dependency_job_id":null,"html_url":"https://github.com/mozilla-services/pyramid_ipauth","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/mozilla-services/pyramid_ipauth","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mozilla-services%2Fpyramid_ipauth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mozilla-services%2Fpyramid_ipauth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mozilla-services%2Fpyramid_ipauth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mozilla-services%2Fpyramid_ipauth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mozilla-services","download_url":"https://codeload.github.com/mozilla-services/pyramid_ipauth/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mozilla-services%2Fpyramid_ipauth/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28412733,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T05:26:33.345Z","status":"ssl_error","status_checked_at":"2026-01-14T05:21:57.251Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["inactive","unmaintained"],"created_at":"2024-08-04T01:01:06.936Z","updated_at":"2026-01-14T07:14:17.429Z","avatar_url":"https://github.com/mozilla-services.png","language":"Python","funding_links":[],"categories":["Authentication"],"sub_categories":[],"readme":"==============\npyramid_ipauth\n==============\n\nAn authentication policy for Pyramid that sets identity and effective\nprincipals based on the remote IP address of the request.\n\n\nOverview\n========\n\nTo perform IP-address-based authentication, create an IPAuthenticationPolicy\nand specify the target IP range, userid and effective principals.  Then set it\nas the authentication policy in your configurator::\n\n    authn_policy = IPAuthenticationPolicy(\"127.0.*.*\", \"myuser\", [\"locals\"])\n    config.set_authentication_policy(authn_policy)\n\nThis will cause all requests from IP addresses in the 127.0.*.* range to be\nauthenticated as user \"myuser\" and have the effective principal \"locals\".\n\nIt is also possible to specify the configuration options in your deployment\nfile::\n\n    [app:pyramidapp]\n    use = egg:mypyramidapp\n\n    ipauth.ipaddrs = 127.0.0.* 127.0.1.*\n    ipauth.principals = locals\n\nYou can then simply include the pyramid_ipauth package into your configurator::\n\n    config.include(\"pyramid_ipauth\")\n\nIt will detect the ipauth settings and construct an appropriate policy.\n\nNote that this package only supports matching against a single set of IP\naddresss.  If you need to assign different credentials to different sets\nof IP addresses, you can use the pyramid_multiauth package in conjunction\nwith pyramid_ipauth:\n\n    http://github.com/mozilla-services/pyramid_multiauth\n\nIf you don't want to hard-code the userid or principals at configuration time,\nyou may specify a \"get_userid\" and/or \"get_principals\" callback instead.\n\n\nSpecifying IP Addresses\n=======================\n\nIP addresses can be specified in a variety of forms, including:\n\n    * \"all\":        all possible IPv4 and IPv6 addresses\n    * \"local\":      all local addresses of the machine\n    * \"A.B.C.D\"     a single IP address\n    * \"A.B.C.D/N\"   a network address specification\n    * \"A.B.C.*\"     a glob matching against all possible numbers\n    * \"A.B.C.D-E\"   a glob matching against a range of numbers\n    * a whitespace- or comma-separated string of any of the above\n    * a netaddr IPAddress, IPRange, IPGlob, IPNetork of IPSet object\n    * a list, tuple or iterable of any of the above\n\n\nProxies\n=======\n\nThis module does not respect the X-Forwarded-For header by default, since it\ncan be spoofed easily by malicious clients.  If your server is behind a \ntrusted proxy that sets the X-Forwarded-For header, you should explicitly\ndeclare the set of trusted proxies like so::\n\n    IPAuthenticationPolicy(\"127.0.*.*\",\n                           principals=[\"local\"],\n                           proxies = \"127.0.0.1\")\n\nThe set of trusted proxy addresses can be specified using the same syntax as\nthe set of IP addresses to authenticate.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmozilla-services%2Fpyramid_ipauth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmozilla-services%2Fpyramid_ipauth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmozilla-services%2Fpyramid_ipauth/lists"}