| Product name | Team | Owner | Tech lead | Some link | Lifecycle stage | Tags |
|---|---|---|---|---|---|---|
| My product | ThatTeam | Cassie Cash | Someguy Someguyson | https://company.com/asdf | Production | backend |
This is a basic POC for handling consents in Polestar. This project contains everything to deploy a full serverless stack into AWS.
It supports four key use-cases:
TODO Write an easy-to-follow guide or onboarding material for new users to help them quickly do something with the software.
See CONTRIBUTING.md for all coding standards and other questions you might have if you will start working on this product.
Note that none of this is needed if the application is already up and running.
DeploymentRole role in AWS (using data in cicd-iam folder)TODO Configurations that are required and/or can be edited, including for initial setup, if necessary.
Run npm install or yarn.
Run npm test or yarn test.
Run npm start or yarn start.
NOTE: You will first have to deploy the stateful infrastructure (DynamoDB and SQS queues) before deploying the stateless infrastructure (API Gateway, Lambda functions, etc.).
dev environmentRun npm run deploy:infra or yarn deploy:infra.
test environmentRun npm run deploy:infra:test or yarn deploy:infra:test.
prod environmentRun npm run deploy:infra:prod or yarn deploy:infra:prod.
dev environmentRun npm run deploy or yarn deploy.
test environmentRun npm run deploy:test or yarn deploy:test.
prod environmentRun npm run deploy:prod or yarn deploy:prod.
dev environmentRun npm run teardown or yarn teardown.
test environmentRun npm run teardown:test or yarn teardown:test.
prod environmentRun npm run teardown:prod or yarn teardown:prod.
Our online documentation can be found at:
Source code for our repositories can be found at:
2.1: Domain modelling has been performed and documented.
Please see the diagrams folder.

We follow the Michael Nygard model for Architectural Decision Records.
Please see the adr folder.
Visit the docs on Bump or see the api folder.
Request validation is done on AWS API Gateway using JSON Schema Draft 4 format. If you get unexpected behavior when calling it, and immediately receiving status code 400, then ensure that you are sending requests as expected. See the api folder for the files.
We use optional headers to assign the correct usage of stages ("environments") and possible versions of the software.
Not using headers will default to the production mode.
Version is for addressing evolutionary, possibly breaking changes.
X-Client-Version: The version of the software to run, for example 1 or 21 or whatever the software is set to accept as the current "steady normal state"Stage is similar to the "environment" concept, however we don't separate the "hardware stack" based on its test/QA/dev/staging/prod status - instead we use a single hardware stack with multiple dynamically addressable stages.
X-Client-Stage: The stage of the software to run, for example prod or my-feature-demoprodDocumentNewConsentEndpoint to use to document a consent when you have no SalesforceID availible. Will create and return a salesforceID and document the consent.
POST {{BASE_URL}}/DocumentNewConsent
{
"firstName": "Test",
"lastName": "Testesson",
"phoneNumber": "1234",
"emailAddress": "test@company.com",
"purposes": [
{
"Id": "c894a173-0b89-449a-be9d-49bb0685d921",
"TransactionType": "CONFIRMED | NOTGIVEN | WITHDRAWN"
}
],
"collectionPointId": "8a6c6c59-57a8-443f-88ca-5d712122a212",
"market": "SE",
"language": "sv-se"
}
{
"salesforceId": "0013H00000Waw0TQAR"
}
DocumentUpdatedConsentEndpoint to use to document a consent when you already have SalesforceID availible. Will document the consent on the given SalesforceId
PATCH {{BASE_URL}}/DocumentUpdatedConsent
{
"salesforceId": "0013H00000Waw0TQAR",
"collectionPointId": "8a6c6c59-57a8-443f-88ca-5d712122a212",
"purposes": [
{
"Id": "c894a173-0b89-449a-be9d-49bb0685d921",
"TransactionType": "CONFIRMED | NOTGIVEN | WITHDRAWN"
}
],
"market": "SE",
"language": "sv-se"
}
204 No content
GetConsentGets the Purposes for the given Collection point with data wheater the data subject has consented or not to them.
GET {{BASE_URL}}/GetConsent?salesforceId=0013H00000Waw0TQAR&collectionPointId=8a6c6c59-57a8-443f-88ca-5d712122a212&market=dk&language=da-dk
[
{
"id": "c894a173-0b89-449a-be9d-49bb0685d921",
"label": "Consent Service Dev",
"description": "Development Purpose for Consent Service v2",
"status": "ACTIVE",
"version": 4,
"hasConsented": true
}
]
GetPurposesGets the Purposes configured for the given Collection point, not including any consent information.
GET {{BASE_URL}}/GetPurposes?collectionPointId=8a6c6c59-57a8-443f-88ca-5d712122a212&market=dk&language=da-dk
[
{
"id": "c894a173-0b89-449a-be9d-49bb0685d921",
"label": "Consent Service Dev",
"description": "Development Purpose for Consent Service v2",
"status": "ACTIVE",
"version": 4
}
]
X-Client-Version?execute-api)Specify how to run tests and describe what types of tests are conducted. Also, specify any manual validations that might be needed and how to do them.
Write how you have designed your solution, for example in terms of technical scaling, databases, network segregation, and so on. See SDLC safeguards section 2 for more on these requirements.
Something here.
Something here.
8.1: Reliability is automatically calculated and we know if reliability is compromised.
Something here.
Something here.
Something here.
Something here. For more, see Data Inventory section above.
Something here.
Something here.
2.10: Failure scenarios are modeled and solutions are designed.
2.16: Service Level Objectives have been defined and published.
What information does this service log? Link to logs/log group.
Which dashboards exist? Is it easy to determine whether or not this microservice is working correctly by looking at the dashboard? Link to dashboards.
Currently all of these report to Mikael's Polestar email address.
9.1: A decommissioning process exists.
See CHANGELOG.md.
We have a risk-based remediation strategy, with monthly, or more frequent, reviews. We use the CVSS framework to prioritize the order in which discovered vulnerabilities are fixed.
We use the following software tooling/products/services to aid us in our work:
Please see SECURITY.md for more.
Please see CONTRIBUTING.md.
Please see CODE_OF_CONDUCT.md.
Please see LICENSE.md.
Generated using TypeDoc