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

Release 2024.03.2 #1947

Merged
merged 34 commits into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
971dfe9
refactor(enrollment): add littlepay as dependency
angela-tran Feb 20, 2024
04f8ecb
docs(pathways): add youtube videos for agency card, older adult, vete…
machikoyasuda Mar 1, 2024
c9adcba
chore: remove unused gif
machikoyasuda Mar 4, 2024
6aa03f2
Docs: Add YouTube videos for enrollment pathways (#1924)
machikoyasuda Mar 5, 2024
99ddea5
fix(dependabot): remove duplicate pip check
thekaveman Mar 6, 2024
a5cb987
Fix: remove duplicate dependabot pip check (#1934)
thekaveman Mar 7, 2024
a72e3d1
chore(deps): bump mkdocs-material from 9.5.12 to 9.5.13
dependabot[bot] Mar 7, 2024
6b15d14
chore(deps): bump mkdocs-material from 9.5.12 to 9.5.13 (#1932)
thekaveman Mar 7, 2024
6e238c3
refactor(enrollment): request access token using Backoffice API
angela-tran Feb 21, 2024
08d20eb
refactor(enrollment): get API token before getting enrollment token
angela-tran Feb 21, 2024
b79b9c2
chore: add commented out line that is not working but should be in test
angela-tran Feb 23, 2024
fbc3a48
refactor(enrollment): implement enrollment using Backoffice API
angela-tran Feb 23, 2024
0c0ecb1
refactor(enrollment): delete unused code and tests
angela-tran Feb 27, 2024
a8b7b52
test(enrollment): update existing view tests to reflect Backoffice API
angela-tran Feb 28, 2024
a3809b2
test(enrollment): add test coverage for customer already enrolled
angela-tran Feb 28, 2024
6c6bb80
test(enrollment): add test coverage for non-HTTPError failure
angela-tran Feb 28, 2024
ed26642
refactor(model): update PaymentProcessor model and migration
angela-tran Feb 28, 2024
cdb379e
refactor(migrations): combine migrations related to Backoffice refactor
angela-tran Mar 7, 2024
3bfb9e8
chore: clean up / update sample .env and update sample fixtures
angela-tran Mar 7, 2024
88be9f3
Refactor: enrollment with Backoffice API (#1905)
angela-tran Mar 8, 2024
b55fd53
chore(deps-dev): bump django from 5.0.2 to 5.0.3
dependabot[bot] Mar 8, 2024
5d7ef46
chore(deps-dev): bump sentry-sdk from 1.40.6 to 1.41.0
dependabot[bot] Mar 8, 2024
df728fe
chore(pre-commit): autoupdate hooks
pre-commit-ci[bot] Mar 12, 2024
41194b2
chore(pre-commit): autoupdate hooks (#1940)
thekaveman Mar 13, 2024
750818b
feat(sentry): recursively scrub PII from event data
thekaveman Mar 13, 2024
45e689d
chore(deps-dev): bump django from 5.0.2 to 5.0.3 (#1930)
thekaveman Mar 13, 2024
f3a3f2e
chore(deps-dev): bump django-google-sso from 5.0.0 to 6.0.1
dependabot[bot] Mar 13, 2024
34f03d4
chore(deps-dev): bump sentry-sdk from 1.40.6 to 1.41.0 (#1935)
thekaveman Mar 13, 2024
70a7188
chore(deps-dev): bump django-google-sso from 5.0.0 to 6.0.1 (#1942)
thekaveman Mar 13, 2024
731d31d
chore: use calitp-littlepay from PyPI
angela-tran Mar 13, 2024
739f8ab
Chore: use calitp-littlepay from PyPI (#1944)
angela-tran Mar 13, 2024
97aacbc
chore: bump version for 2024.03.2
thekaveman Mar 13, 2024
8657192
Chore: bump version for 2024.03.2 (#1945)
thekaveman Mar 13, 2024
36201dd
Deploy 2024.03.2 to test (#1946)
angela-tran Mar 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 3 additions & 9 deletions .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,8 @@ courtesy_card_verifier_api_auth_key=server-auth-token
mobility_pass_verifier_api_auth_key=server-auth-token
client_private_key='-----BEGIN RSA PRIVATE KEY-----\nMIIEpAIBAAKCAQEA1pt0ZoOuPEVPJJS+5r884zcjZLkZZ2GcPwr79XOLDbOi46on\nCa79kjRnhS0VUK96SwUPS0z9J5m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dRajmbCHm+Eiz+/+4NwY\nkt5I1/NMu7vYUR40MwyEuPSm3Q+bvEGu/71pL8wFIUVlshNJ5CN60fA8qqo+5kVK\n4Ntzy7Kq6WpC9Dhh75vE3ZcCgYEAty99uXtxsJD6+aEwcvcENkUwUztPQ6ggAwci\nje9Z/cmwCj6s9mN3HzfQ4qgGrZsHpk4ycCK655xhilBFOIQJ3YRUKUaDYk4H0YDe\nOsf6gTP8wtQDH2GZSNlavLk5w7UFDYQD2b47y4fw+NaOEYvjPl0p5lmb6ebAPZb8\nFbKZRd0CgYBC1HTbA+zMEqDdY4MWJJLC6jZsjdxOGhzjrCtWcIWEGMDF7oDDEoix\nW3j2hwm4C6vaNkH9XX1dr5+q6gq8vJQdbYoExl22BGMiNbfI3+sLRk0zBYL//W6c\ntSREgR4EjosqQfbkceLJ2JT1wuNjInI0eR9H3cRugvlDTeWtbdJ5qA==\n-----END RSA PRIVATE KEY-----'
client_public_key='-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA1pt0ZoOuPEVPJJS+5r88\n4zcjZLkZZ2GcPwr79XOLDbOi46onCa79kjRnhS0VUK96SwUPS0z9J5mDA5LSNL2R\noxFb5QGaevnJY828NupzTNdUd0sYJK3kRjKUggHWuB55hwJcH/Dx7I3DNH4NL68U\nAlK+VjwJkfYPrhq/bl5z8ZiurvBa5C1mDxhFpcTZlCfxQoas7D1d+uPACF6mEMbQ\nNd3RaIaSREO50NvNywXIIt/OmCiRqI7JtOcn4eyh1I4j9WtlbMhRJLfwPMAgY5ep\nTsWcURmhVofF2wVoFbib3JGCfA7tz/gmP5YoEKnf/cumKmF3e9LrZb8zwm7bTHUV\niwIDAQAB\n-----END PUBLIC KEY-----'
mst_payment_processor_client_cert='-----BEGIN CERTIFICATE-----\nPEM DATA\n-----END CERTIFICATE-----'
mst_payment_processor_client_cert_private_key='-----BEGIN RSA PRIVATE KEY-----\nPEM DATA\n-----END RSA PRIVATE KEY-----'
mst_payment_processor_client_cert_root_ca='-----BEGIN CERTIFICATE-----\nPEM DATA\n-----END CERTIFICATE-----'
sacrt_payment_processor_client_cert='-----BEGIN CERTIFICATE-----\nPEM DATA\n-----END CERTIFICATE-----'
sacrt_payment_processor_client_cert_private_key='-----BEGIN RSA PRIVATE KEY-----\nPEM DATA\n-----END RSA PRIVATE KEY-----'
sacrt_payment_processor_client_cert_root_ca='-----BEGIN CERTIFICATE-----\nPEM DATA\n-----END CERTIFICATE-----'
sbmtd_payment_processor_client_cert='-----BEGIN CERTIFICATE-----\nPEM DATA\n-----END CERTIFICATE-----'
sbmtd_payment_processor_client_cert_private_key='-----BEGIN RSA PRIVATE KEY-----\nPEM DATA\n-----END RSA PRIVATE KEY-----'
sbmtd_payment_processor_client_cert_root_ca='-----BEGIN CERTIFICATE-----\nPEM DATA\n-----END CERTIFICATE-----'
mst_payment_processor_client_secret=secret
sacrt_payment_processor_client_secret=secret
sbmtd_payment_processor_client_secret=secret

testsecret="Hello from the local environment!"
9 changes: 0 additions & 9 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,6 @@ updates:
include: "scope"
labels:
- "dependencies"
- package-ecosystem: "pip"
directory: "/docs" # requirements.txt
schedule:
interval: "daily"
commit-message:
prefix: "chore"
include: "scope"
labels:
- "dependencies"
- package-ecosystem: "github-actions"
# Workflow files stored in the
# default location of `.github/workflows`
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ repos:
- python

- repo: https://github.com/pycqa/bandit
rev: 1.7.7
rev: 1.7.8
hooks:
- id: bandit
args: ["-ll"]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Generated by Django 5.0.2 on 2024-03-07 21:38

import benefits.core.models
import benefits.secrets
from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("core", "0001_initial"),
]

operations = [
migrations.RemoveField(
model_name="paymentprocessor",
name="api_access_token_endpoint",
),
migrations.RemoveField(
model_name="paymentprocessor",
name="api_access_token_request_key",
),
migrations.RemoveField(
model_name="paymentprocessor",
name="api_access_token_request_val",
),
migrations.RemoveField(
model_name="paymentprocessor",
name="client_cert",
),
migrations.RemoveField(
model_name="paymentprocessor",
name="client_cert_private_key",
),
migrations.RemoveField(
model_name="paymentprocessor",
name="client_cert_root_ca",
),
migrations.RemoveField(
model_name="paymentprocessor",
name="customer_endpoint",
),
migrations.RemoveField(
model_name="paymentprocessor",
name="customers_endpoint",
),
migrations.RemoveField(
model_name="paymentprocessor",
name="group_endpoint",
),
migrations.AddField(
model_name="paymentprocessor",
name="audience",
field=models.TextField(default="audience"),
preserve_default=False,
),
migrations.AddField(
model_name="paymentprocessor",
name="client_id",
field=models.TextField(default="client_id"),
preserve_default=False,
),
migrations.AddField(
model_name="paymentprocessor",
name="client_secret_name",
field=benefits.core.models.SecretNameField(
default="client-secret-name", max_length=127, validators=[benefits.secrets.SecretNameValidator()]
),
preserve_default=False,
),
]
123 changes: 12 additions & 111 deletions benefits/core/migrations/local_fixtures.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,87 +35,6 @@
"remote_url": null
}
},
{
"model": "core.pemdata",
"pk": 5,
"fields": {
"label": "(MST) payment processor client certificate",
"text_secret_name": "mst-payment-processor-client-cert",
"remote_url": null
}
},
{
"model": "core.pemdata",
"pk": 6,
"fields": {
"label": "(MST) payment processor client certificate private key",
"text_secret_name": "mst-payment-processor-client-cert-private-key",
"remote_url": null
}
},
{
"model": "core.pemdata",
"pk": 7,
"fields": {
"label": "(MST) payment processor client certificate root CA",
"text_secret_name": "mst-payment-processor-client-cert-root-ca",
"remote_url": null
}
},
{
"model": "core.pemdata",
"pk": 8,
"fields": {
"label": "(SacRT) payment processor client certificate",
"text_secret_name": "sacrt-payment-processor-client-cert",
"remote_url": null
}
},
{
"model": "core.pemdata",
"pk": 9,
"fields": {
"label": "(SacRT) payment processor client certificate private key",
"text_secret_name": "sacrt-payment-processor-client-cert-private-key",
"remote_url": null
}
},
{
"model": "core.pemdata",
"pk": 10,
"fields": {
"label": "(SacRT) payment processor client certificate root CA",
"text_secret_name": "sacrt-payment-processor-client-cert-root-ca",
"remote_url": null
}
},
{
"model": "core.pemdata",
"pk": 11,
"fields": {
"label": "(SBMTD) payment processor client certificate",
"text_secret_name": "sbmtd-payment-processor-client-cert",
"remote_url": null
}
},
{
"model": "core.pemdata",
"pk": 12,
"fields": {
"label": "(SBMTD) payment processor client certificate private key",
"text_secret_name": "sbmtd-payment-processor-client-cert-private-key",
"remote_url": null
}
},
{
"model": "core.pemdata",
"pk": 13,
"fields": {
"label": "(SBMTD) payment processor client certificate root CA",
"text_secret_name": "sbmtd-payment-processor-client-cert-root-ca",
"remote_url": null
}
},
{
"model": "core.authprovider",
"pk": 1,
Expand Down Expand Up @@ -324,18 +243,12 @@
"fields": {
"name": "(MST) test payment processor",
"api_base_url": "http://server:8000",
"api_access_token_endpoint": "access-token",
"api_access_token_request_key": "request_access",
"api_access_token_request_val": "REQUEST_ACCESS",
"client_id": "",
"client_secret_name": "mst-payment-processor-client-secret",
"audience": "",
"card_tokenize_url": "http://server:8000/static/tokenize.js",
"card_tokenize_func": "tokenize",
"card_tokenize_env": "test",
"client_cert": 5,
"client_cert_private_key": 6,
"client_cert_root_ca": 7,
"customer_endpoint": "customer",
"customers_endpoint": "customers",
"group_endpoint": "group"
"card_tokenize_env": "test"
}
},
{
Expand All @@ -344,18 +257,12 @@
"fields": {
"name": "(SacRT) test payment processor",
"api_base_url": "http://server:8000",
"api_access_token_endpoint": "access-token",
"api_access_token_request_key": "request_access",
"api_access_token_request_val": "REQUEST_ACCESS",
"client_id": "",
"client_secret_name": "sacrt-payment-processor-client-secret",
"audience": "",
"card_tokenize_url": "http://server:8000/static/tokenize.js",
"card_tokenize_func": "tokenize",
"card_tokenize_env": "test",
"client_cert": 8,
"client_cert_private_key": 9,
"client_cert_root_ca": 10,
"customer_endpoint": "customer",
"customers_endpoint": "customers",
"group_endpoint": "group"
"card_tokenize_env": "test"
}
},
{
Expand All @@ -364,18 +271,12 @@
"fields": {
"name": "(SBMTD) test payment processor",
"api_base_url": "http://server:8000",
"api_access_token_endpoint": "access-token",
"api_access_token_request_key": "request_access",
"api_access_token_request_val": "REQUEST_ACCESS",
"client_id": "",
"client_secret_name": "sbmtd-payment-processor-client-secret",
"audience": "",
"card_tokenize_url": "http://server:8000/static/tokenize.js",
"card_tokenize_func": "tokenize",
"card_tokenize_env": "test",
"client_cert": 11,
"client_cert_private_key": 12,
"client_cert_root_ca": 13,
"customer_endpoint": "customer",
"customers_endpoint": "customers",
"group_endpoint": "group"
"card_tokenize_env": "test"
}
},
{
Expand Down
19 changes: 7 additions & 12 deletions benefits/core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,21 +206,16 @@ class PaymentProcessor(models.Model):
id = models.AutoField(primary_key=True)
name = models.TextField()
api_base_url = models.TextField()
api_access_token_endpoint = models.TextField()
api_access_token_request_key = models.TextField()
api_access_token_request_val = models.TextField()
client_id = models.TextField()
client_secret_name = SecretNameField()
audience = models.TextField()
card_tokenize_url = models.TextField()
card_tokenize_func = models.TextField()
card_tokenize_env = models.TextField()
# The certificate used for client certificate authentication to the API
client_cert = models.ForeignKey(PemData, related_name="+", on_delete=models.PROTECT)
# The private key, used to sign the certificate
client_cert_private_key = models.ForeignKey(PemData, related_name="+", on_delete=models.PROTECT)
# The root CA bundle, used to verify the server.
client_cert_root_ca = models.ForeignKey(PemData, related_name="+", on_delete=models.PROTECT)
customer_endpoint = models.TextField()
customers_endpoint = models.TextField()
group_endpoint = models.TextField()

@property
def client_secret(self):
return get_secret_by_name(self.client_secret_name)

def __str__(self):
return self.name
Expand Down