Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename "Passbook" into "Apple Wallet" #79

Open
wants to merge 3 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
31 changes: 19 additions & 12 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pretix-passbook
.. image:: https://travis-ci.org/pretix/pretix-passbook.svg?branch=master
:target: https://travis-ci.org/pretix/pretix-passbook

This is a plugin for `pretix`_. It allows to provide tickets in the passbook format supported by Apple Wallet and a
This is a plugin for `pretix`_. It allows to provide tickets in the pkpass format supported by Apple Wallet and a
number of Android apps.

Contributing
Expand Down Expand Up @@ -36,26 +36,33 @@ Development setup
the 'plugins' tab in the settings.


Generating Passbook keys and configuring them in pretix
-------------------------------------------------------
Obtaining *Pass Type ID certificates* and configuring them in pretix
--------------------------------------------------------------------

You can generate a key and CSR using::
1. To obtain a *Pass Type ID certificate* you need to generate an *RSA private key* and a certificate signing request (CSR) using::

export CERT_NAME=pass-pretix
openssl genrsa -out $CERT_NAME.key 2048
openssl pkey -in $CERT_NAME.key -traditional > $CERT_NAME.key.pem
openssl genpkey -out $CERT_NAME.key -algorithm RSA -pkeyopt rsa_keygen_bits:2048
openssl req -new -key $CERT_NAME.key -out $CERT_NAME.csr

You can then request a certificate using that CSR in your `Apple developer account`_. You can then convert the downloaded certificate like this::
2. Request a *Pass Type ID certificate* using the CSR (``pass-pretix.csr``) in your `Apple developer account`_ and download the certificate (as ``pass-pretix.cer``)

3. Convert the downloaded certificate to PEM format::

openssl x509 -inform der -in $CERT_NAME.cer -out $CERT_NAME.pem

After generating the .pem file, upload it to pretix as passbook certificate.
Make sure you have uploaded the key generated before (pass-pretix.key) and added the passbook CA of apple.
Next add your Team ID in pretix and the passbook type id. The passbook type id is your identifier, as example pass.pretix.example. The Team ID can be found under "Organizational Unit" when opening the passbook certificate, e.g. with Keychain on MacOS.
If you have configured your private rsa key with a password you can provide it in pretix.
4. Setup your *Pass Type ID certificate* in pretix within global settings
- Add your Team ID
(The Team ID can be found under "Organizational Unit" when opening the certificate, e.g. with Keychain on MacOS or you can find it in your `Apple developer account`_)
- Add the Pass Type ID
(The Pass Type ID is your identifier, for example ``pass.pretix.example``)
- Upload the *Pass Type ID certificate* (``pass-pretix.pem``)
- Add the right *Apple Intermediate Certificate* for your certificate
(You can download the current certificate from Apple at https://www.apple.com/certificateauthority/AppleWWDRCAG4.cer)
- Paste the *RSA private key* (``pass-pretix.key``) into the secret key field
- If you have configured your *RSA private key* with a password, it is necessary to provide it in pretix
- Click on `Save`

Click on Save.
Enjoy!

License
Expand Down
4 changes: 2 additions & 2 deletions pretix_passbook/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@

class PassbookApp(AppConfig):
name = "pretix_passbook"
verbose_name = "Passbook Tickets"
verbose_name = "Apple Wallet Tickets"

class PretixPluginMeta:
name = gettext_lazy("Passbook Tickets")
author = "Tobias Kunze, Raphael Michel"
description = gettext_lazy("Provides passbook tickets for pretix")
description = gettext_lazy("Provides Apple Wallet tickets for pretix")
category = "FORMAT"
visible = True
featured = True
Expand Down
24 changes: 16 additions & 8 deletions pretix_passbook/signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,30 +23,38 @@ def register_global_settings(sender, **kwargs):
(
"passbook_team_id",
forms.CharField(
label=_("Passbook team ID"),
label=_("Passbook: Team ID"),
help_text=_(
"The Team ID can be found under 'Organizational Unit' when "
"opening the certificate, e.g. with Keychain on MacOS or you "
"can find it in your Apple developer account"
),
required=False,
),
),
(
"passbook_pass_type_id",
forms.CharField(
label=_("Passbook type"),
label=_("Passbook: Pass Type ID"),
help_text=_(
"The Pass Type ID is your identifier, for example pass.pretix.example"
),
required=False,
),
),
(
"passbook_certificate_file",
CertificateFileField(
label=_("Passbook certificate file"),
label=_("Passbook: Pass Type ID Certificate"),
required=False,
),
),
(
"passbook_wwdr_certificate_file",
CertificateFileField(
label=_("Passbook CA Certificate"),
label=_("Passbook: Apple Intermediate Certificate"),
help_text=_(
"You can download the current CA certificate from apple at "
"You can download the current certificate from Apple at "
"https://www.apple.com/certificateauthority/AppleWWDRCAG4.cer"
),
required=False,
Expand All @@ -55,7 +63,7 @@ def register_global_settings(sender, **kwargs):
(
"passbook_key",
forms.CharField(
label=_("Passbook secret key"),
label=_("Passbook: RSA private key"),
required=False,
widget=forms.Textarea,
validators=[validate_rsa_privkey],
Expand All @@ -64,11 +72,11 @@ def register_global_settings(sender, **kwargs):
(
"passbook_key_password",
forms.CharField(
label=_("Passbook key password"),
label=_("Passbook: RSA private key password"),
widget=forms.PasswordInput(render_value=True),
required=False,
help_text=_(
"Optional, only necessary if the key entered above requires a password to use."
"Optional, only necessary if the RSA private key entered above requires a password."
),
),
),
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "pretix-passbook"
dynamic = ["version"]
description = "Passbook tickets for pretix"
description = "Apple Wallet tickets for pretix"
readme = "README.rst"
requires-python = ">=3.9"
license = {file = "LICENSE"}
Expand Down