Skip to content
Merged
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
1 change: 0 additions & 1 deletion client-admin/src/content/privacy.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ Conversation participants may opt to use third party data collector and processo

### Technical Infrastructure

- We use Akismet spam filter to filter out spam comments (can be configured through administrative access). Information about how Akismet uses your data when you use our Site can be found at: <https://automattic.com/privacy/>
- We use Heroku’s web hosting services, including a hosted Postgres database, where we store all information. Information about how Heroku uses this data when you use our Site can be found at: <https://www.salesforce.com/company/privacy/>
- We use Logentries for server logs, which may include personal information such as IP address necessary for debugging production issues. Information about how Logentries uses this data when you use our Site can be found at: <https://www.rapid7.com/privacy-policy/>
- We use Amazon Web Services Simple Email Service for sending account confirmation and notification emails to users. We also use AWS Simple Storage Service (S3) for securely storing and managing data, ensuring reliability, scalability, and compliance with industry-standard security measures. Information about how AWS handles data can be found at: <https://aws.amazon.com/privacy/>
Expand Down
1 change: 0 additions & 1 deletion docs/configuration-env-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ Use [configuration guidance](configuration.md) and [deployment/service inventory
| `ADMIN_EMAIL_DATA_EXPORT_TEST` | [server/src/config.ts:87](../server/src/config.ts#L87) | undefined at lookup; no fallback in this expression | No (configuration/identifier; may still be private) | application / script / infrastructure; TypeScript AST |
| `ADMIN_EMAIL_EMAIL_TEST` | [server/src/config.ts:88](../server/src/config.ts#L88) | undefined at lookup; no fallback in this expression | No (configuration/identifier; may still be private) | application / script / infrastructure; TypeScript AST |
| `ADMIN_UIDS` | [server/src/config.ts:90](../server/src/config.ts#L90) | fallback expression: process.env.ADMIN_UIDS &#124;&#124; "[]" | No (configuration/identifier; may still be private) | application / script / infrastructure; TypeScript AST |
| `AKISMET_ANTISPAM_API_KEY` | [server/src/config.ts:91](../server/src/config.ts#L91) | credential-bearing fallback/expression; value omitted, inspect source | Yes / may carry credentials | application / script / infrastructure; TypeScript AST |
| `ANTHROPIC_API_KEY` | [server/src/config.ts:92](../server/src/config.ts#L92) | credential-bearing fallback/expression; value omitted, inspect source | Yes / may carry credentials | application / script / infrastructure; TypeScript AST |
| `ANTHROPIC_MODEL` | [server/src/routes/delphi/batchReports.ts:53](../server/src/routes/delphi/batchReports.ts#L53) | fallback expression: (req.body.model as string) &#124;&#124; process.env.ANTHROPIC_MODEL | No (configuration/identifier; may still be private) | application / script / infrastructure; TypeScript AST |
| `API_DEV_HOSTNAME` | [server/src/config.ts:5](../server/src/config.ts#L5) | fallback expression: process.env.API_DEV_HOSTNAME &#124;&#124; "localhost:5000" | No (configuration/identifier; may still be private) | application / script / infrastructure; TypeScript AST |
Expand Down
1 change: 0 additions & 1 deletion docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,6 @@ Every database read runs in a `READ ONLY` transaction with a 3 s statement timeo

(Requirements depend on the selected integration and launch path. Missing values do not universally disable a feature cleanly; constructors and request paths can fail. See the [service inventory](deployment-configuration.md#external-service-touchpoints).)

- **`AKISMET_ANTISPAM_API_KEY`** Comment spam detection and filtering.
- **`GA_TRACKING_ID`** For using Google Analytics on client pages.
- **`GOOGLE_CREDENTIALS_BASE64`** Required if using Google Translate API. (See below).
- **`GOOGLE_CREDS_STRINGIFIED`** Alternative to **`GOOGLE_CREDENTIALS_BASE64`** (See below).
Expand Down
2 changes: 1 addition & 1 deletion docs/deployment-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ The last column lists direct named environment reads in the same source file, if
| 083 | Google Translate | [server/src/comment.ts:54](../server/src/comment.ts#L54) | in scope; application / script / infrastructure | None in this file; inspect imports/arguments/SDK |
| 084 | Google Translate | [server/src/comment.ts:511](../server/src/comment.ts#L511) | in scope; application / script / infrastructure | None in this file; inspect imports/arguments/SDK |
| 085 | Google Translate | [server/src/comment.ts:534](../server/src/comment.ts#L534) | in scope; application / script / infrastructure | None in this file; inspect imports/arguments/SDK |
| 086 | OIDC | [server/src/config.ts:115](../server/src/config.ts#L115) | in scope; application / script / infrastructure | `ADMIN_EMAILS`, `ADMIN_EMAIL_DATA_EXPORT`, `ADMIN_EMAIL_DATA_EXPORT_TEST`, `ADMIN_EMAIL_EMAIL_TEST`, `ADMIN_UIDS`, `AKISMET_ANTISPAM_API_KEY`, `ANTHROPIC_API_KEY`, `API_DEV_HOSTNAME`, `API_PROD_HOSTNAME`, `API_SERVER_PORT`, `APPLICATION_NAME`, `AUTH0_CLIENT_ID`, `AUTH0_CLIENT_SECRET`, `AUTH0_DOMAIN`, `AUTH_AUDIENCE`, `AUTH_CLIENT_ID`, `AUTH_CLIENT_SECRET`, `AUTH_DOMAIN`, `AUTH_ISSUER`, `AUTH_NAMESPACE`, `AWS_ACCESS_KEY_ID`, `AWS_LOG_GROUP_NAME`, `AWS_REGION`, `AWS_S3_BUCKET_NAME`, `AWS_S3_ENDPOINT`, `AWS_S3_JOB_BUCKET_NAME`, `AWS_S3_PUBLIC_ENDPOINT`, `AWS_SECRET_ACCESS_KEY`, `BACKFILL_COMMENT_LANG_DETECTION`, `CACHE_MATH_RESULTS`, `DATABASE_SSL`, `DATABASE_URL`, `DD_ENV`, `DEV_MODE`, `DOMAIN_OVERRIDE`, `DOMAIN_WHITELIST_ITEM_01`, `DOMAIN_WHITELIST_ITEM_02`, `DOMAIN_WHITELIST_ITEM_03`, `DOMAIN_WHITELIST_ITEM_04`, `DOMAIN_WHITELIST_ITEM_05`, `DOMAIN_WHITELIST_ITEM_06`, `DOMAIN_WHITELIST_ITEM_07`, `DOMAIN_WHITELIST_ITEM_08`, `DYNAMODB_ENDPOINT`, `EMAIL_TRANSPORT_TYPES`, `ENCRYPTION_PASSWORD_00001`, `GEMINI_API_KEY`, `GOOGLE_CREDENTIALS_BASE64`, `GOOGLE_CREDS_STRINGIFIED`, `JWKS_URI`, `JWT_PRIVATE_KEY`, `JWT_PRIVATE_KEY_PATH`, `JWT_PUBLIC_KEY`, `JWT_PUBLIC_KEY_PATH`, `LOGIN_CODE_PEPPER`, `MAILGUN_API_KEY`, `MAILGUN_DOMAIN`, `MATH_ENV`, `MAX_REPORT_CACHE_DURATION`, `NODE_ENV`, `OPENAI_API_KEY`, `POLIS_FROM_ADDRESS`, `POLIS_JWT_AUDIENCE`, `POLIS_JWT_ISSUER`, `POLIS_QUEUE_SUBSTRATE_ENABLED`, `POLIS_REACHABLE_ERROR_HANDLER`, `PORT`, `READ_ONLY_DATABASE_URL`, `RUN_PERIODIC_EXPORT_TESTS`, `SERVER_LOG_LEVEL`, `SERVER_LOG_TO_FILE`, `SES_ENDPOINT`, `SHOULD_USE_TRANSLATION_API`, `SQS_LOCAL_ENDPOINT`, `SQS_QUEUE_URL`, `STATIC_FILES_ADMIN_PORT`, `STATIC_FILES_HOST`, `STATIC_FILES_PARTICIPATION_PORT`, `STATIC_FILES_PORT`, `TESTING`, `TOPICAL_COMMENT_RATIO`, `USE_NETWORK_HOST`, `WEBSERVER_PASS`, `WEBSERVER_USERNAME` |
| 086 | OIDC | [server/src/config.ts:115](../server/src/config.ts#L115) | in scope; application / script / infrastructure | `ADMIN_EMAILS`, `ADMIN_EMAIL_DATA_EXPORT`, `ADMIN_EMAIL_DATA_EXPORT_TEST`, `ADMIN_EMAIL_EMAIL_TEST`, `ADMIN_UIDS`, `ANTHROPIC_API_KEY`, `API_DEV_HOSTNAME`, `API_PROD_HOSTNAME`, `API_SERVER_PORT`, `APPLICATION_NAME`, `AUTH0_CLIENT_ID`, `AUTH0_CLIENT_SECRET`, `AUTH0_DOMAIN`, `AUTH_AUDIENCE`, `AUTH_CLIENT_ID`, `AUTH_CLIENT_SECRET`, `AUTH_DOMAIN`, `AUTH_ISSUER`, `AUTH_NAMESPACE`, `AWS_ACCESS_KEY_ID`, `AWS_LOG_GROUP_NAME`, `AWS_REGION`, `AWS_S3_BUCKET_NAME`, `AWS_S3_ENDPOINT`, `AWS_S3_JOB_BUCKET_NAME`, `AWS_S3_PUBLIC_ENDPOINT`, `AWS_SECRET_ACCESS_KEY`, `BACKFILL_COMMENT_LANG_DETECTION`, `CACHE_MATH_RESULTS`, `DATABASE_SSL`, `DATABASE_URL`, `DD_ENV`, `DEV_MODE`, `DOMAIN_OVERRIDE`, `DOMAIN_WHITELIST_ITEM_01`, `DOMAIN_WHITELIST_ITEM_02`, `DOMAIN_WHITELIST_ITEM_03`, `DOMAIN_WHITELIST_ITEM_04`, `DOMAIN_WHITELIST_ITEM_05`, `DOMAIN_WHITELIST_ITEM_06`, `DOMAIN_WHITELIST_ITEM_07`, `DOMAIN_WHITELIST_ITEM_08`, `DYNAMODB_ENDPOINT`, `EMAIL_TRANSPORT_TYPES`, `ENCRYPTION_PASSWORD_00001`, `GEMINI_API_KEY`, `GOOGLE_CREDENTIALS_BASE64`, `GOOGLE_CREDS_STRINGIFIED`, `JWKS_URI`, `JWT_PRIVATE_KEY`, `JWT_PRIVATE_KEY_PATH`, `JWT_PUBLIC_KEY`, `JWT_PUBLIC_KEY_PATH`, `LOGIN_CODE_PEPPER`, `MAILGUN_API_KEY`, `MAILGUN_DOMAIN`, `MATH_ENV`, `MAX_REPORT_CACHE_DURATION`, `NODE_ENV`, `OPENAI_API_KEY`, `POLIS_FROM_ADDRESS`, `POLIS_JWT_AUDIENCE`, `POLIS_JWT_ISSUER`, `POLIS_QUEUE_SUBSTRATE_ENABLED`, `POLIS_REACHABLE_ERROR_HANDLER`, `PORT`, `READ_ONLY_DATABASE_URL`, `RUN_PERIODIC_EXPORT_TESTS`, `SERVER_LOG_LEVEL`, `SERVER_LOG_TO_FILE`, `SES_ENDPOINT`, `SHOULD_USE_TRANSLATION_API`, `SQS_LOCAL_ENDPOINT`, `SQS_QUEUE_URL`, `STATIC_FILES_ADMIN_PORT`, `STATIC_FILES_HOST`, `STATIC_FILES_PARTICIPATION_PORT`, `STATIC_FILES_PORT`, `TESTING`, `TOPICAL_COMMENT_RATIO`, `USE_NETWORK_HOST`, `WEBSERVER_PASS`, `WEBSERVER_USERNAME` |
| 087 | SES | [server/src/email/senders.ts:11](../server/src/email/senders.ts#L11) | in scope; application / script / infrastructure | None in this file; inspect imports/arguments/SDK |
| 088 | SES | [server/src/email/senders.ts:12](../server/src/email/senders.ts#L12) | in scope; application / script / infrastructure | None in this file; inspect imports/arguments/SDK |
| 089 | SES | [server/src/email/senders.ts:17](../server/src/email/senders.ts#L17) | in scope; application / script / infrastructure | None in this file; inspect imports/arguments/SDK |
Expand Down
1 change: 0 additions & 1 deletion example.env
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,6 @@ STATIC_FILES_HOST=file-server

###### THIRD PARTY API CREDENTIALS ######
# These are all optional, but some features will not work without them.
AKISMET_ANTISPAM_API_KEY=
# To enable Google Analytics, set this to your tracking id:
GA_TRACKING_ID=
# One of the following is required if SHOULD_USE_TRANSLATION_API is true:
Expand Down
13 changes: 10 additions & 3 deletions queue-rs/polis-contracts/src/setup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,13 @@ pub struct Admission {
/// except invite acceptance and returning invite login, which use their own routes.
pub fn predict(setup: &ConversationSetup, entry: Entry, action: Action) -> Admission {
use Entry::*;
// The permanent cookie is ignored, even when it names an existing member.
// Without a token these requests follow the ordinary first-contact path.
let entry = match entry {
LegacyCookieMember => Anonymous,
CookieMemberXid => NewXidDenied,
other => other,
};
let refuse = |status, code| Admission {
status,
code: Some(code),
Expand All @@ -343,8 +350,7 @@ pub fn predict(setup: &ConversationSetup, entry: Entry, action: Action) -> Admis
// paths only the new allowed ID is on the list.
let unlisted_xid = matches!(
entry,
CookieMemberXid
| KnownXidMember
KnownXidMember
| KnownXidNonmember
| XidMemberChangedXid
| XidSameOwnerUnknownXid
Expand Down Expand Up @@ -517,7 +523,8 @@ pub fn entry_proposal(entry: Entry) -> &'static str {
XidTokenSameOwner|XidTokenOtherOwner|XidOtherOwnerKnownXid|XidSameOwnerUnknownXid=>"Admin should have explicit cross-conversation identity rules; token scope should not silently change identity class.",
SignedInNew|SignedInMember|SignedInXid|Owner|SiteModeratorNew=>"Admin should choose whether sign-in substitutes for external ID or invitation; owner/moderator exceptions should be consistent.",
Invite|ReturningInvite=>"Admin should control whether outstanding invite and login codes remain usable after closing or disabling invitations.",
LegacyCookieMember|CookieMemberXid=>"Admin should have an explicit legacy-identity migration policy; a cookie must not silently authorize a different external ID.",
LegacyCookieMember=>"The old cookie is ignored; without a token this is a fresh anonymous contact subject to the current admission policy.",
CookieMemberXid=>"The old cookie is ignored; without a token the supplied external ID follows the new denied-ID admission policy.",
AnonymousMember|AnonymousMemberXid|XidTokenMember|XidMemberChangedXid=>"Admin should choose which admission changes recheck existing membership and external-ID changes.",
}
}
Expand Down
Loading
Loading