Skip to content

Commit 1469945

Browse files
KinyaElGrandeFajfa
authored andcommitted
Add records limit count per namespace
1 parent 312c57f commit 1469945

19 files changed

Lines changed: 288 additions & 205 deletions

File tree

locale/en/corteza-server/compose/record.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@ errors:
2222
staleData: stale data
2323
unknownBulkOperation: unknown bulk operation {bulkOperation}
2424
valueInput: invalid record value input
25+
maxRecordsReached: maximum number of records per namespace reached

server/.env.example

Lines changed: 50 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
###############################################################################
3535
# Allow insecure (invalid, expired TLS/SSL certificates) connections.
36-
#
36+
#
3737
# [IMPORTANT]
3838
# ====
3939
# We strongly recommend keeping this value set to false except for local development or demos.
@@ -203,7 +203,7 @@
203203

204204
###############################################################################
205205
# Password for the web console endpoint. When running in dev environment, password is not required.
206-
#
206+
#
207207
# Corteza intentionally sets default password to random chars to prevent security incidents.
208208
# Type: string
209209
# Default: <no value>
@@ -290,7 +290,7 @@
290290
# Email sending
291291
#
292292
# Configure your local SMTP server or use one of the available providers.
293-
#
293+
#
294294
# These values are copied to settings when the server starts and can be managed from the administration console.
295295
# We recommend you remove these values after they are copied to settings.
296296
# If server detects difference between these options and settings, it shows a warning in the log on server start.
@@ -430,7 +430,7 @@
430430

431431
###############################################################################
432432
# Password security allows you to disable constraints to which passwords must conform to.
433-
#
433+
#
434434
# [CAUTION]
435435
# ====
436436
# Disabling password security can be useful for development environments as it removes the need for complex passwords.
@@ -442,12 +442,12 @@
442442

443443
###############################################################################
444444
# Algoritm to be use for JWT signature.
445-
#
445+
#
446446
# Supported valus:
447447
# - HS256, HS384, HS512
448448
# - PS256, PS384, PS512,
449449
# - RS256, RS384, RS512
450-
#
450+
#
451451
# Provide shared secret string for HS256, HS384, HS512 and full private key or path to the file PS* and RS* algorithms.
452452
# Type: string
453453
# Default: HS512
@@ -456,7 +456,7 @@
456456
###############################################################################
457457
# Secret used for signing JWT tokens.
458458
# Value is used only when HS256, HS384 or HS512 algorithm is used.
459-
#
459+
#
460460
# [IMPORTANT]
461461
# ====
462462
# If secret is not set, system auto-generates one from DB_DSN and HOSTNAME environment variables.
@@ -480,23 +480,23 @@
480480

481481
###############################################################################
482482
# Lifetime of the refresh token. Should be much longer than lifetime of the access token.
483-
#
483+
#
484484
# Refresh tokens are used to exchange expired access tokens with new ones.
485485
# Type: time.Duration
486486
# Default: 72h
487487
# AUTH_OAUTH2_REFRESH_TOKEN_LIFETIME=72h
488488

489489
###############################################################################
490490
# Redirect URL to be sent with OAuth2 authentication request to provider
491-
#
491+
#
492492
# `provider` placeholder is replaced with the actual value when used.
493493
# Type: string
494494
# Default: <no value>
495495
# AUTH_EXTERNAL_REDIRECT_URL=<no value>
496496

497497
###############################################################################
498498
# Secret used for securing cookies
499-
#
499+
#
500500
# [IMPORTANT]
501501
# ====
502502
# If secret is not set, system auto-generates one from DB_DSN and HOSTNAME environment variables.
@@ -539,21 +539,21 @@
539539

540540
###############################################################################
541541
# Maximum time user is allowed to stay idle when logged in without "remember-me" option and before session is expired.
542-
#
542+
#
543543
# Recomended value is between an hour and a day.
544-
#
544+
#
545545
# [IMPORTANT]
546546
# ====
547547
# This affects only profile (/auth) pages. Using applications (admin, compose, ...) does not prolong the session.
548548
# ====
549-
#
549+
#
550550
# Type: time.Duration
551551
# Default: 24h
552552
# AUTH_SESSION_LIFETIME=24h
553553

554554
###############################################################################
555555
# Duration of the session in /auth lasts when user logs-in with "remember-me" option.
556-
#
556+
#
557557
# If set to 0, "remember-me" option is removed.
558558
# Type: time.Duration
559559
# Default: 8640h
@@ -580,7 +580,7 @@
580580

581581
###############################################################################
582582
# Secret used for securing CSRF protection
583-
#
583+
#
584584
# [IMPORTANT]
585585
# ====
586586
# If secret is not set, system auto-generates one from DB_DSN and HOSTNAME environment variables.
@@ -610,19 +610,19 @@
610610

611611
###############################################################################
612612
# Handle for OAuth2 client used for automatic redirect from /auth/oauth2/go endpoint.
613-
#
613+
#
614614
# This simplifies configuration for OAuth2 flow for Corteza Web applications as it removes
615615
# the need to suply redirection URL and client ID (oauth2/go endpoint does that internally)
616-
#
616+
#
617617
# Type: string
618618
# Default: corteza-webapp
619619
# AUTH_DEFAULT_CLIENT=corteza-webapp
620620

621621
###############################################################################
622622
# Path to js, css, images and template source files
623-
#
623+
#
624624
# When corteza starts, if path exists it tries to load template files from it.
625-
#
625+
#
626626
# When empty path is set (default value), embedded files are used.
627627
# Type: string
628628
# Default: <no value>
@@ -631,7 +631,7 @@
631631
###############################################################################
632632
# When enabled, corteza reloads template before every execution.
633633
# Enable this for debugging or when developing auth templates.
634-
#
634+
#
635635
# Should be disabled in production where templates do not change between server restarts.
636636
# Type: bool
637637
# Default: <no value>
@@ -640,7 +640,7 @@
640640
###############################################################################
641641
# When set, Corteza creates one or more users with the configured values using provided email as a password.
642642
# It skips existing (email, handle). All new users are assigned to all bypass roles.
643-
#
643+
#
644644
# When set in production, Corteza stops and reports an error
645645
# Type: string
646646
# Default: <no value>
@@ -810,6 +810,12 @@
810810
# Default: <no value>
811811
# LIMIT_SYSTEM_USERS=<no value>
812812

813+
###############################################################################
814+
# Maximum number of records per namespace
815+
# Type: int
816+
# Default: <no value>
817+
# LIMIT_RECORD_COUNT_PER_NAMESPACE=<no value>
818+
813819
###############################################################################
814820
###############################################################################
815821
# locale
@@ -818,16 +824,16 @@
818824
###############################################################################
819825
# List of compa delimited languages (language tags) to enable.
820826
# In case when an enabled language can not be loaded, error is logged.
821-
#
827+
#
822828
# When loading language configurations (config.xml) from the configured path(s).
823-
#
829+
#
824830
# Type: string
825831
# Default: en
826832
# LOCALE_LANGUAGES=en
827833

828834
###############################################################################
829835
# One or more paths to locale config and translation files, separated by colon
830-
#
836+
#
831837
# When with LOCALE_DEVELOPMENT_MODE=true, default value for path is ../../locale
832838
# Type: string
833839
# Default: <no value>
@@ -837,7 +843,7 @@
837843
# Name of the query string parameter used to pass the language tag (it overrides Accept-Language header).
838844
# Set it to empty string to disable detection from the query string.
839845
# This parameter is ignored if only one language is enabled
840-
#
846+
#
841847
# Type: string
842848
# Default: lng
843849
# LOCALE_QUERY_STRING_PARAM=lng
@@ -868,57 +874,57 @@
868874

869875
###############################################################################
870876
# Disables json format for logging and enables more human-readable output with colors.
871-
#
877+
#
872878
# Disable for production.
873-
#
879+
#
874880
# Type: bool
875881
# Default: <no value>
876882
# LOG_DEBUG=<no value>
877883

878884
###############################################################################
879885
# Minimum logging level. If set to "warn",
880886
# Levels warn, error, dpanic panic and fatal will be logged.
881-
#
887+
#
882888
# Recommended value for production: warn
883-
#
889+
#
884890
# Possible values: debug, info, warn, error, dpanic, panic, fatal
885-
#
891+
#
886892
# Type: string
887893
# Default: warn
888894
# LOG_LEVEL=warn
889895

890896
###############################################################################
891897
# Log filtering rules by level and name (log-level:log-namespace).
892898
# Please note that level (LOG_LEVEL) is applied before filter and it affects the final output!
893-
#
899+
#
894900
# Leave unset for production.
895-
#
901+
#
896902
# Example:
897903
# `warn+:* *:auth,workflow.*`
898904
# Log warnings, errors, panic, fatals. Everything from auth and workflow is logged.
899-
#
900-
#
905+
#
906+
#
901907
# See more examples and documentation here: https://github.com/moul/zapfilter
902-
#
908+
#
903909
# Type: string
904910
# Default: <no value>
905911
# LOG_FILTER=<no value>
906912

907913
###############################################################################
908914
# Set to true to see where the logging was called from.
909-
#
915+
#
910916
# Disable for production.
911-
#
917+
#
912918
# Type: bool
913919
# Default: <no value>
914920
# LOG_INCLUDE_CALLER=<no value>
915921

916922
###############################################################################
917923
# Include stack-trace when logging at a specified level or below.
918924
# Disable for production.
919-
#
925+
#
920926
# Possible values: debug, info, warn, error, dpanic, panic, fatal
921-
#
927+
#
922928
# Type: string
923929
# Default: dpanic
924930
# LOG_STACKTRACE_LEVEL=dpanic
@@ -1013,11 +1019,11 @@
10131019
#
10141020
# Provisioning allows you to configure a {PRODUCT_NAME} instance when deployed.
10151021
# It occurs automatically after the {PRODUCT_NAME} server starts.
1016-
#
1022+
#
10171023
# [IMPORTANT]
10181024
# ====
10191025
# We recommend you to keep provisioning enabled as it simplifies version updates by updating the database and updating settings.
1020-
#
1026+
#
10211027
# If you're doing local development or some debugging, you can disable this.
10221028
# ====
10231029
#
@@ -1043,7 +1049,7 @@
10431049
# ====
10441050
# These parameters help in the development and testing process.
10451051
# When you are deploying to production, these should be disabled to improve performance and reduce storage usage.
1046-
#
1052+
#
10471053
# You should configure external services such as Sentry or ELK to keep track of logs and error reports.
10481054
# ====
10491055
#
@@ -1149,7 +1155,7 @@
11491155
# Delay system startup
11501156
#
11511157
# You can configure these options to defer API execution until another external (HTTP) service is up and running.
1152-
#
1158+
#
11531159
# [ TIP ]
11541160
# ====
11551161
# Delaying API execution can come in handy in complex setups where execution order is important.
@@ -1173,7 +1179,7 @@
11731179
###############################################################################
11741180
# Space delimited list of hosts and/or URLs to probe.
11751181
# Host format: `host` or `host:443` (port will default to 80).
1176-
#
1182+
#
11771183
# [NOTE]
11781184
# ====
11791185
# Services are probed in parallel.

0 commit comments

Comments
 (0)