Database model for the dependency proxy settings
💾 The database model for the dependency proxy settings
This issue is for introducing a new model/table for the dependency proxy settings.
Table: packages_dependency_proxy_settings
Model: Packages::DependencyProxy::Setting
Columns:
-
enabled
. Boolean with a default value tofalse
. -
project_id
foreign key toprojects
. We want to establish a one-to-one association so we don't need a primary key, thisproject_id
will act as the primary key. -
enabled
boolean. Default:false
. Toggle to quickly enable or disable the dependency proxy. -
maven_external_registry_url
. Text (with a limit). Can't beNULL
. The url of the external registry. -
maven_external_registry_username
. Text (with a limit). Can beNULL
. Presence validation combined withmaven_external_registry_password
(either both are set or none of them are set). -
maven_external_registry_password
. Text (with a limit). Can beNULL
. Presence validation combined withmaven_external_registry_username
(either both are set or none of them are set).
The model will have helpers and scopes as usual (as necessary) but we want to call out here that username
and password
can't be saved as they are. That would be a security problem. Thankfully, we have https://docs.gitlab.com/ee/development/secure_coding_guidelines.html#handling-credentials. We will need to attr_encrypted
both attributes.
🔭 The Plan
From the investigation:
- Database Model. (
👈 this issue) - The Maven dependency proxy API: cache hit path (#410717 - closed).
- The Maven dependency proxy API: cache miss path (#410719 - closed).
- The dependency proxy API skeleton for Maven pac... (#410721 - closed).
- The dependency proxy settings GraphQL API (#410725 - closed).
- Dependency proxy for Maven: frontend changes (#410726 - closed).
- (Option) Dependency proxy for Maven: the prefill option (#410730).
- Document the dependency proxy for Maven (#410731 - closed).
Edited by David Fernandez