diff --git a/.circleci/config.yml b/.circleci/config.yml index 37ce8374349ee3997487c738b8ff1b30319ec520..b367ad73570f6d4d942b9bb723de5db4f07a8dd1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -64,7 +64,7 @@ jobs: command: | . venv/bin/activate pip install . - coverage run -m twisted.trial _secureaccesstokenauthorizer + coverage run -m twisted.trial _zkapauthorizer - run: name: "Report Coverage" diff --git a/CONTRIBUTING b/CONTRIBUTING index 93055b0dc24d61a9bc3d353e1473b70dd06a33ff..587c37bc5cf8bd3580a6c65dfa1d63220760d2f2 100644 --- a/CONTRIBUTING +++ b/CONTRIBUTING @@ -1,5 +1,5 @@ -Contributing to SecureAccessTokenAuthorizer -=========================================== +Contributing to ZKAPAuthorizer +============================== Contributions are accepted in many forms. @@ -11,9 +11,9 @@ Examples of contributions include: File a ticket at: -https://github.com/PrivateStorageio/SecureAccessTokenAuthorizer/issues/new +https://github.com/PrivateStorageio/ZKAPAuthorizer/issues/new -SecureAccessTokenAuthorizer uses GitHub keep track of bugs, feature requests, and associated patches. +ZKAPAuthorizer uses GitHub keep track of bugs, feature requests, and associated patches. Contributions are managed using GitHub's Pull Requests. For a PR to be accepted it needs to have: diff --git a/README.rst b/README.rst index 0b4ea27c80ccb7d0df4f6521123bc559c9f7e1f6..11216b0ce7ea881eda8fd4a87a98aa5b0881abe2 100644 --- a/README.rst +++ b/README.rst @@ -1,5 +1,5 @@ -Secure Access Token Authorizer -============================== +Zero-Knowledge Access Pass Authorizer +===================================== |coverage|_ |circleci|_ @@ -7,9 +7,9 @@ Secure Access Token Authorizer What is this? ------------- -Secure Access Token Authorizer is a `Tahoe-LAFS`_ storage-system plugin which authorizes storage operations based on privacy-respecting tokens. +Zero-Knowledge Access Pass (ZKAP) Authorizer is a `Tahoe-LAFS`_ storage-system plugin which authorizes storage operations based on privacy-respecting passes. -Such tokens derive from `PrivacyPass`_. +Such passes derive from `PrivacyPass`_. They allow a Tahoe-LAFS client to prove it has a right to access without revealing additional information. Copyright @@ -33,8 +33,8 @@ Copyright .. _PrivacyPass: https://privacypass.github.io/ -.. |coverage| image:: https://codecov.io/gh/PrivateStorageio/SecureAccessTokenAuthorizer/branch/master/graph/badge.svg -.. _coverage: https://codecov.io/gh/PrivateStorageio/SecureAccessTokenAuthorizer +.. |coverage| image:: https://codecov.io/gh/PrivateStorageio/ZKAPAuthorizer/branch/master/graph/badge.svg +.. _coverage: https://codecov.io/gh/PrivateStorageio/ZKAPAuthorizer -.. |circleci| image:: https://circleci.com/gh/PrivateStorageio/SecureAccessTokenAuthorizer.svg?style=svg -.. _circleci: https://circleci.com/gh/PrivateStorageio/SecureAccessTokenAuthorizer +.. |circleci| image:: https://circleci.com/gh/PrivateStorageio/ZKAPAuthorizer.svg?style=svg +.. _circleci: https://circleci.com/gh/PrivateStorageio/ZKAPAuthorizer diff --git a/default.nix b/default.nix index 06e185c4d85697fa06bb7f119d5b306c76e12bb7..c0d3d7f5a4ec51f39fa0d64486e3051f5788d6dc 100644 --- a/default.nix +++ b/default.nix @@ -1,2 +1,2 @@ { pkgs ? import <nixpkgs> { overlays = [ (import ./overlays.nix) ]; } }: -pkgs.python27Packages.callPackage ./secure-access-token-authorizer.nix { } +pkgs.python27Packages.callPackage ./zkapauthorizer.nix { } diff --git a/docs/source/conf.py b/docs/source/conf.py index f3522be997054d2ee7f63d614be77a7f84cc0b19..dacdfe51d1cedfe1b5b8baff87f552729808d594 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -19,7 +19,7 @@ # -- Project information ----------------------------------------------------- -project = 'Secure Access Token Authorizer' +project = 'Zero-Knowledge Access Pass Authorizer' copyright = '2019, PrivateStorage.io, LLC' author = 'PrivateStorage.io, LLC' @@ -101,7 +101,7 @@ html_static_path = ['_static'] # -- Options for HTMLHelp output --------------------------------------------- # Output file base name for HTML help builder. -htmlhelp_basename = 'SecureAccessTokenAuthorizerdoc' +htmlhelp_basename = 'ZKAPAuthorizer-doc' # -- Options for LaTeX output ------------------------------------------------ @@ -128,7 +128,7 @@ latex_elements = { # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ - (master_doc, 'SecureAccessTokenAuthorizer.tex', 'Secure Access Token Authorizer Documentation', + (master_doc, 'ZKAPAuthorizer.tex', 'ZKAP Authorizer Documentation', 'PrivateStorage.io, LLC', 'manual'), ] @@ -138,7 +138,7 @@ latex_documents = [ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ - (master_doc, 'secureaccesstokenauthorizer', 'Secure Access Token Authorizer Documentation', + (master_doc, 'zkapauthorizer', 'ZKAP Authorizer Documentation', [author], 1) ] @@ -149,8 +149,8 @@ man_pages = [ # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ - (master_doc, 'SecureAccessTokenAuthorizer', 'Secure Access Token Authorizer Documentation', - author, 'SecureAccessTokenAuthorizer', 'One line description of project.', + (master_doc, 'ZKAPAuthorizer', 'ZKAP Authorizer Documentation', + author, 'ZKAPAuthorizer', 'One line description of project.', 'Miscellaneous'), ] diff --git a/docs/source/index.rst b/docs/source/index.rst index 58bf2107b2c7e5a2b482b018d3eb9aa2165339c6..d178b7d084c4716add8d5527a579dab470159b3d 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -1,10 +1,10 @@ -.. Secure Access Token Authorizer documentation master file, created by +.. ZKAP Authorizer documentation master file, created by sphinx-quickstart on Fri Jun 7 13:47:30 2019. You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. -Welcome to Secure Access Token Authorizer's documentation! -========================================================== +Welcome to ZKAP Authorizer's documentation! +=========================================== .. toctree:: :maxdepth: 2 diff --git a/docs/source/interface.rst b/docs/source/interface.rst index 909d05e134e68cb75c0640e28baf395700fd8b13..261127a9e8f27f4f086f32e14b6a3a5a43197429 100644 --- a/docs/source/interface.rst +++ b/docs/source/interface.rst @@ -5,10 +5,10 @@ Client ------ When enabled in a Tahoe-LAFS client node, -SecureAccessTokenAuthorizer publishes an HTTP-based interface inside the main Tahoe-LAFS web interface. +ZKAPAuthorizer publishes an HTTP-based interface inside the main Tahoe-LAFS web interface. -``PUT /storage-plugins/privatestorageio-satauthz-v1/voucher`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +``PUT /storage-plugins/privatestorageio-zkapauthz-v1/voucher`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This endpoint allows an external agent which has submitted a payment to cause the plugin to redeem the voucher for tokens. The request body for this endpoint must have the ``application/json`` content-type. @@ -22,8 +22,8 @@ If the voucher cannot be accepted at the time of the request then the response c If the response is **OK** then a repeated request with the same body will have no effect. If the response is not **OK** then a repeated request with the same body will try to accept the number again. -``GET /storage-plugins/privatestorageio-satauthz-v1/voucher/<voucher>`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +``GET /storage-plugins/privatestorageio-zkapauthz-v1/voucher/<voucher>`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This endpoint allows an external agent to monitor the status of the redemption of a voucher. This endpoint accepts no request body. @@ -37,8 +37,8 @@ the response is **OK** with an ``application/json`` content-type response body l The ``value`` property merely indicates the voucher which was requested. Further properties will be added to this response in the near future. -``GET /storage-plugins/privatestorageio-satauthz-v1/voucher`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +``GET /storage-plugins/privatestorageio-zkapauthz-v1/voucher`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This endpoint allows an external agent to retrieve the status of all vouchers. This endpoint accepts no request body. diff --git a/pyproject.toml b/pyproject.toml index 9e80cabc04445c41c931abb192cf5058084c8777..72280c92ba5d9213a24c71a6777a1d0a1b1f6d34 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [tool.towncrier] - package = "_secureaccesstokenauthorizer" + package = "_zkapauthorizer" package_dir = "src" filename = "ChangeLog.rst" diff --git a/setup.cfg b/setup.cfg index ea683eefb824023d09d2cdcc42afef4d5c9803b7..c4ae93ac82f9cb95c62808094828edd783ce255d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,7 +1,7 @@ # Generally describe the project [metadata] -name = Secure Access Token Authorizer -version = attr: _secureaccesstokenauthorizer.__version__ +name = Zero-Knowledge Access Pass Authorizer +version = attr: _zkapauthorizer.__version__ description = A `Tahoe-LAFS`_ storage-system plugin which authorizes storage operations based on privacy-respecting tokens. long_description = file: README.rst, CHANGELOG.rst, LICENSE-2.0.txt keywords = tahoe-lafs, storage, privacy, cryptography @@ -26,6 +26,6 @@ package_dir = # Explicitly list our packages because the automatic finder can't deal with # the plugins package we want to ship. packages = - _secureaccesstokenauthorizer - _secureaccesstokenauthorizer.tests + _zkapauthorizer + _zkapauthorizer.tests twisted.plugins diff --git a/shell.nix b/shell.nix index 5dcc7a8b4dc3eb06fef0a879f02209e866a65ae1..9831badbecba81acb54a50f95fe677e6ca9a57e6 100644 --- a/shell.nix +++ b/shell.nix @@ -1,6 +1,6 @@ { pkgs ? import <nixpkgs> { overlays = [ (import ./overlays.nix) ]; } }: let - satauthorizer = pkgs.callPackage ./default.nix { }; + zkapauthorizer = pkgs.callPackage ./default.nix { }; in (pkgs.python27.buildEnv.override { extraLibs = with pkgs.python27Packages; [ @@ -8,7 +8,7 @@ in testtools hypothesis pyhamcrest - satauthorizer + zkapauthorizer ]; ignoreCollisions = true; }).env diff --git a/src/_secureaccesstokenauthorizer/__init__.py b/src/_zkapauthorizer/__init__.py similarity index 100% rename from src/_secureaccesstokenauthorizer/__init__.py rename to src/_zkapauthorizer/__init__.py diff --git a/src/_secureaccesstokenauthorizer/_base64.py b/src/_zkapauthorizer/_base64.py similarity index 100% rename from src/_secureaccesstokenauthorizer/_base64.py rename to src/_zkapauthorizer/_base64.py diff --git a/src/_secureaccesstokenauthorizer/_plugin.py b/src/_zkapauthorizer/_plugin.py similarity index 84% rename from src/_secureaccesstokenauthorizer/_plugin.py rename to src/_zkapauthorizer/_plugin.py index ac1dd02b3c0af55fdc63e7d383ec663b02db45b3..e83f3166663e3a9a9e849be57dbc77f458257d3c 100644 --- a/src/_secureaccesstokenauthorizer/_plugin.py +++ b/src/_zkapauthorizer/_plugin.py @@ -13,7 +13,7 @@ # limitations under the License. """ -The Twisted plugin that glues the Secure Access Token system into +The Twisted plugin that glues the Zero-Knowledge Access Pass system into Tahoe-LAFS. """ @@ -33,8 +33,8 @@ from allmydata.interfaces import ( ) from .api import ( - SecureAccessTokenAuthorizerStorageServer, - SecureAccessTokenAuthorizerStorageClient, + ZKAPAuthorizerStorageServer, + ZKAPAuthorizerStorageClient, ) from ._storage_server import ( @@ -54,16 +54,16 @@ class AnnounceableStorageServer(object): @implementer(IFoolscapStoragePlugin) -class SecureAccessTokenAuthorizer(object): +class ZKAPAuthorizer(object): """ A storage plugin which provides a token-based access control mechanism on top of the Tahoe-LAFS built-in storage server interface. """ - name = u"privatestorageio-satauthz-v1" + name = u"privatestorageio-zkapauthz-v1" def get_storage_server(self, configuration, get_anonymous_storage_server): announcement = {} - storage_server = SecureAccessTokenAuthorizerStorageServer( + storage_server = ZKAPAuthorizerStorageServer( get_anonymous_storage_server(), **configuration ) @@ -77,7 +77,7 @@ class SecureAccessTokenAuthorizer(object): def get_storage_client(self, configuration, announcement, get_rref): return succeed( - SecureAccessTokenAuthorizerStorageClient( + ZKAPAuthorizerStorageClient( get_rref, lambda: [b"x" * TOKEN_LENGTH], ) diff --git a/src/_secureaccesstokenauthorizer/_storage_client.py b/src/_zkapauthorizer/_storage_client.py similarity index 98% rename from src/_secureaccesstokenauthorizer/_storage_client.py rename to src/_zkapauthorizer/_storage_client.py index 9ba11b25c0a29409c95d44743b4737524147f627..7615bbaf1b2fb08a8f9509e596bacedffc9d67dc 100644 --- a/src/_secureaccesstokenauthorizer/_storage_client.py +++ b/src/_zkapauthorizer/_storage_client.py @@ -32,7 +32,7 @@ from allmydata.interfaces import ( @implementer(IStorageServer) @attr.s -class SecureAccessTokenAuthorizerStorageClient(object): +class ZKAPAuthorizerStorageClient(object): """ An implementation of the client portion of an access-token-based authorization scheme on top of the basic Tahoe-LAFS storage protocol. diff --git a/src/_secureaccesstokenauthorizer/_storage_server.py b/src/_zkapauthorizer/_storage_server.py similarity index 97% rename from src/_secureaccesstokenauthorizer/_storage_server.py rename to src/_zkapauthorizer/_storage_server.py index 3181f4e0008afb748257717e32d66d29264d6abe..a3364f5e4328b7a1b3e89958bfec34c66629b5b5 100644 --- a/src/_secureaccesstokenauthorizer/_storage_server.py +++ b/src/_zkapauthorizer/_storage_server.py @@ -156,7 +156,7 @@ class RITokenAuthorizedStorageServer(RemoteInterface): # `cmp=False` (identity based hashing) but Referenceable wants to set some # attributes on self and it's hard to avoid that. @attr.s(cmp=False) -class SecureAccessTokenAuthorizerStorageServer(Referenceable): +class ZKAPAuthorizerStorageServer(Referenceable): """ A class which wraps an ``RIStorageServer`` to insert token validity checks before allowing certain functionality. @@ -240,7 +240,7 @@ class SecureAccessTokenAuthorizerStorageServer(Referenceable): return self._original.remote_slot_readv(*a, **kw) # I don't understand why this is required. -# SecureAccessTokenAuthorizerStorageServer is-a Referenceable. It seems like +# ZKAPAuthorizerStorageServer is-a Referenceable. It seems like # the built in adapter should take care of this case. from twisted.python.components import ( registerAdapter, @@ -251,4 +251,4 @@ from foolscap.referenceable import ( from foolscap.ipb import ( ISlicer, ) -registerAdapter(ReferenceableSlicer, SecureAccessTokenAuthorizerStorageServer, ISlicer) +registerAdapter(ReferenceableSlicer, ZKAPAuthorizerStorageServer, ISlicer) diff --git a/src/_secureaccesstokenauthorizer/api.py b/src/_zkapauthorizer/api.py similarity index 73% rename from src/_secureaccesstokenauthorizer/api.py rename to src/_zkapauthorizer/api.py index 53887349735138b3d8463c5d070361a422b3da72..81f47520ce66ffadb55a41fb3885d1cd50a7947c 100644 --- a/src/_secureaccesstokenauthorizer/api.py +++ b/src/_zkapauthorizer/api.py @@ -13,18 +13,18 @@ # limitations under the License. __all__ = [ - "SecureAccessTokenAuthorizerStorageServer", - "SecureAccessTokenAuthorizerStorageClient", - "SecureAccessTokenAuthorizer", + "ZKAPAuthorizerStorageServer", + "ZKAPAuthorizerStorageClient", + "ZKAPAuthorizer", ] from ._storage_server import ( - SecureAccessTokenAuthorizerStorageServer, + ZKAPAuthorizerStorageServer, ) from ._storage_client import ( - SecureAccessTokenAuthorizerStorageClient, + ZKAPAuthorizerStorageClient, ) from ._plugin import ( - SecureAccessTokenAuthorizer, + ZKAPAuthorizer, ) diff --git a/src/_secureaccesstokenauthorizer/controller.py b/src/_zkapauthorizer/controller.py similarity index 100% rename from src/_secureaccesstokenauthorizer/controller.py rename to src/_zkapauthorizer/controller.py diff --git a/src/_secureaccesstokenauthorizer/model.py b/src/_zkapauthorizer/model.py similarity index 98% rename from src/_secureaccesstokenauthorizer/model.py rename to src/_zkapauthorizer/model.py index 3027761be74ff61961e752071f6e8f8b293fdc02..58357cb237a36e9d1ac300529ccb0d9bdad0c03b 100644 --- a/src/_secureaccesstokenauthorizer/model.py +++ b/src/_zkapauthorizer/model.py @@ -49,7 +49,7 @@ class SchemaError(TypeError): pass -CONFIG_DB_NAME = u"privatestorageio-satauthz-v1.sqlite3" +CONFIG_DB_NAME = u"privatestorageio-zkapauthz-v1.sqlite3" def open_and_initialize(path, required_schema_version, connect=None): """ diff --git a/src/_secureaccesstokenauthorizer/newsfragments/.gitignore b/src/_zkapauthorizer/newsfragments/.gitignore similarity index 100% rename from src/_secureaccesstokenauthorizer/newsfragments/.gitignore rename to src/_zkapauthorizer/newsfragments/.gitignore diff --git a/src/_secureaccesstokenauthorizer/resource.py b/src/_zkapauthorizer/resource.py similarity index 98% rename from src/_secureaccesstokenauthorizer/resource.py rename to src/_zkapauthorizer/resource.py index 97743a5bc35842ded2b4c3dcd1c05c38109189b0..e13b81b2260ded02c90aa496eab06158ef452f10 100644 --- a/src/_secureaccesstokenauthorizer/resource.py +++ b/src/_zkapauthorizer/resource.py @@ -49,7 +49,7 @@ def from_configuration(node_config, store=None): Instantiate the plugin root resource using data from its configuration section in the Tahoe-LAFS configuration file:: - [storageclient.plugins.privatestorageio-satauthz-v1] + [storageclient.plugins.privatestorageio-zkapauthz-v1] # nothing yet :param _Config node_config: An object representing the overall node diff --git a/src/_secureaccesstokenauthorizer/tests/__init__.py b/src/_zkapauthorizer/tests/__init__.py similarity index 100% rename from src/_secureaccesstokenauthorizer/tests/__init__.py rename to src/_zkapauthorizer/tests/__init__.py diff --git a/src/_secureaccesstokenauthorizer/tests/matchers.py b/src/_zkapauthorizer/tests/matchers.py similarity index 100% rename from src/_secureaccesstokenauthorizer/tests/matchers.py rename to src/_zkapauthorizer/tests/matchers.py diff --git a/src/_secureaccesstokenauthorizer/tests/strategies.py b/src/_zkapauthorizer/tests/strategies.py similarity index 99% rename from src/_secureaccesstokenauthorizer/tests/strategies.py rename to src/_zkapauthorizer/tests/strategies.py index 38f4afa502b565ee64799250d7aa22d30e36644e..e615137fd615201776e7ccfa46ba1d908a8f883b 100644 --- a/src/_secureaccesstokenauthorizer/tests/strategies.py +++ b/src/_zkapauthorizer/tests/strategies.py @@ -383,6 +383,6 @@ def test_and_write_vectors_for_shares(): def announcements(): """ - Build announcements for the SecureAccessTokenAuthorizer plugin. + Build announcements for the ZKAPAuthorizer plugin. """ return just({}) diff --git a/src/_secureaccesstokenauthorizer/tests/test_base64.py b/src/_zkapauthorizer/tests/test_base64.py similarity index 96% rename from src/_secureaccesstokenauthorizer/tests/test_base64.py rename to src/_zkapauthorizer/tests/test_base64.py index 569cd6994b6c7ce030070927cac978498917ef3d..05501c6caae6d185a413a9d5876d78c0c5df9322 100644 --- a/src/_secureaccesstokenauthorizer/tests/test_base64.py +++ b/src/_zkapauthorizer/tests/test_base64.py @@ -13,7 +13,7 @@ # limitations under the License. """ -Tests for ``_secureaccesstokenauthorizer._base64``. +Tests for ``_zkapauthorizer._base64``. """ from base64 import ( diff --git a/src/_secureaccesstokenauthorizer/tests/test_client_resource.py b/src/_zkapauthorizer/tests/test_client_resource.py similarity index 99% rename from src/_secureaccesstokenauthorizer/tests/test_client_resource.py rename to src/_zkapauthorizer/tests/test_client_resource.py index 2fc1651bfbfeee07f9f0b1d47d27aca98ef2ff5a..dad75bb63b094f71201f99a8dfdbf1cee3888b13 100644 --- a/src/_secureaccesstokenauthorizer/tests/test_client_resource.py +++ b/src/_zkapauthorizer/tests/test_client_resource.py @@ -121,7 +121,7 @@ def uncooperator(started=True): tahoe_configs_with_client_config = tahoe_configs(storage_client_plugins={ - u"privatestorageio-satauthz-v1": client_configurations(), + u"privatestorageio-zkapauthz-v1": client_configurations(), }) def is_not_json(bytestring): @@ -208,7 +208,7 @@ def root_from_config(config): class VoucherTests(TestCase): """ Tests relating to ``/voucher`` as implemented by the - ``_secureaccesstokenauthorizer.resource`` module and its handling of + ``_zkapauthorizer.resource`` module and its handling of vouchers. """ def setUp(self): diff --git a/src/_secureaccesstokenauthorizer/tests/test_matchers.py b/src/_zkapauthorizer/tests/test_matchers.py similarity index 97% rename from src/_secureaccesstokenauthorizer/tests/test_matchers.py rename to src/_zkapauthorizer/tests/test_matchers.py index ab95ee31b6a7f402406f40ca31dccd443a9c9d56..7ff71c0fd360daefab6a0485dd62abbf4bc4d187 100644 --- a/src/_secureaccesstokenauthorizer/tests/test_matchers.py +++ b/src/_zkapauthorizer/tests/test_matchers.py @@ -13,7 +13,7 @@ # limitations under the License. """ -Tests for ``_secureaccesstokenauthorizer.tests.matchers``. +Tests for ``_zkapauthorizer.tests.matchers``. """ from zope.interface import ( diff --git a/src/_secureaccesstokenauthorizer/tests/test_model.py b/src/_zkapauthorizer/tests/test_model.py similarity index 99% rename from src/_secureaccesstokenauthorizer/tests/test_model.py rename to src/_zkapauthorizer/tests/test_model.py index d700078e3ef31afde38b8799ea17b7033728bf02..7732e5e06f40460bf1acf00665ab1e4501298afa 100644 --- a/src/_secureaccesstokenauthorizer/tests/test_model.py +++ b/src/_zkapauthorizer/tests/test_model.py @@ -14,7 +14,7 @@ # limitations under the License. """ -Tests for ``_secureaccesstokenauthorizer.model``. +Tests for ``_zkapauthorizer.model``. """ from os import ( diff --git a/src/_secureaccesstokenauthorizer/tests/test_plugin.py b/src/_zkapauthorizer/tests/test_plugin.py similarity index 97% rename from src/_secureaccesstokenauthorizer/tests/test_plugin.py rename to src/_zkapauthorizer/tests/test_plugin.py index a7b9dceca6ac9f768d8d9b0f7722f4b25dc7a643..72c017ace8af653dfac8198446e3aa98753265ed 100644 --- a/src/_secureaccesstokenauthorizer/tests/test_plugin.py +++ b/src/_zkapauthorizer/tests/test_plugin.py @@ -64,7 +64,7 @@ from twisted.test.proto_helpers import ( from twisted.web.resource import ( IResource, ) -from twisted.plugins.secureaccesstokenauthorizer import ( +from twisted.plugins.zkapauthorizer import ( storage_server, ) @@ -93,7 +93,7 @@ def get_rref(): class PluginTests(TestCase): """ - Tests for ``twisted.plugins.secureaccesstokenauthorizer.storage_server``. + Tests for ``twisted.plugins.zkapauthorizer.storage_server``. """ def test_discoverable(self): """ diff --git a/src/_secureaccesstokenauthorizer/tests/test_storage_protocol.py b/src/_zkapauthorizer/tests/test_storage_protocol.py similarity index 98% rename from src/_secureaccesstokenauthorizer/tests/test_storage_protocol.py rename to src/_zkapauthorizer/tests/test_storage_protocol.py index 95abe60a5aa6721e4faf049c8b35481896062928..f821ad5278814518ffa196b6c8e47e206f2546d1 100644 --- a/src/_secureaccesstokenauthorizer/tests/test_storage_protocol.py +++ b/src/_zkapauthorizer/tests/test_storage_protocol.py @@ -79,8 +79,8 @@ from .matchers import ( matches_version_dictionary, ) from ..api import ( - SecureAccessTokenAuthorizerStorageServer, - SecureAccessTokenAuthorizerStorageClient, + ZKAPAuthorizerStorageServer, + ZKAPAuthorizerStorageClient, ) from .._storage_server import ( TOKEN_LENGTH, @@ -155,11 +155,11 @@ class ShareTests(TestCase): def get_tokens(): return [b"x" * TOKEN_LENGTH] - self.server = SecureAccessTokenAuthorizerStorageServer( + self.server = ZKAPAuthorizerStorageServer( self.anonymous_storage_server, ) self.local_remote_server = LocalRemote(self.server) - self.client = SecureAccessTokenAuthorizerStorageClient( + self.client = ZKAPAuthorizerStorageClient( get_rref=lambda: self.local_remote_server, get_tokens=get_tokens, ) diff --git a/src/_secureaccesstokenauthorizer/tests/test_strategies.py b/src/_zkapauthorizer/tests/test_strategies.py similarity index 100% rename from src/_secureaccesstokenauthorizer/tests/test_strategies.py rename to src/_zkapauthorizer/tests/test_strategies.py diff --git a/src/_secureaccesstokenauthorizer/tests/test_tokens.py b/src/_zkapauthorizer/tests/test_tokens.py similarity index 100% rename from src/_secureaccesstokenauthorizer/tests/test_tokens.py rename to src/_zkapauthorizer/tests/test_tokens.py diff --git a/src/twisted/plugins/secureaccesstokenauthorizer.py b/src/twisted/plugins/zkapauthorizer.py similarity index 83% rename from src/twisted/plugins/secureaccesstokenauthorizer.py rename to src/twisted/plugins/zkapauthorizer.py index 908d022a1c29f8dab0bbe9cdf891bedab631325e..0b02795d806ebcb58bf279eac9f744d4e539c360 100644 --- a/src/twisted/plugins/secureaccesstokenauthorizer.py +++ b/src/twisted/plugins/zkapauthorizer.py @@ -16,8 +16,8 @@ A drop-in to supply plugins to the Twisted plugin system. """ -from _secureaccesstokenauthorizer.api import ( - SecureAccessTokenAuthorizer, +from _zkapauthorizer.api import ( + ZKAPAuthorizer, ) -storage_server = SecureAccessTokenAuthorizer() +storage_server = ZKAPAuthorizer() diff --git a/secure-access-token-authorizer.nix b/zkapauthorizer.nix similarity index 63% rename from secure-access-token-authorizer.nix rename to zkapauthorizer.nix index e0b7508acfb0ff8b60cde29ba17d075fa108229d..c5f52fbac02604a3230adbbd99aa177c4655a3a4 100644 --- a/secure-access-token-authorizer.nix +++ b/zkapauthorizer.nix @@ -4,7 +4,7 @@ }: buildPythonPackage rec { version = "0.0"; - name = "secure-access-token-authorizer-${version}"; + name = "zero-knowledge-access-pass-authorizer-${version}"; src = ./.; depsBuildBuild = [ @@ -29,7 +29,7 @@ buildPythonPackage rec { ]; checkPhase = '' - ${pyflakes}/bin/pyflakes src/_secureaccesstokenauthorizer - python -m coverage run --source _secureaccesstokenauthorizer,twisted.plugins.secureaccesstokenauthorizer --module twisted.trial _secureaccesstokenauthorizer + ${pyflakes}/bin/pyflakes src/_zkapauthorizer + python -m coverage run --source _zkapauthorizer,twisted.plugins.zkapauthorizer --module twisted.trial _zkapauthorizer ''; }