Skip to content

Update security config to use BE license helper

Samantha Ming requested to merge 358183-fe-use-license-helper into master

What does this MR do and why?

This MR utilizes the BE license helper > !89093 (merged) to display the "Vulnerability management" tab.

Screenshots or screen recordings

Ultimate License Non-ultimate license
2022-04-24_at_3.35_PM 2022-04-24_at_3.32_PM

How to set up and validate locally

License Check

To upload a license, you need to navigate to the admin panel > Settings > General > Add License

  1. Navigate to the "Security Configuration by: "Security & Compliance" > "Configuration"
  2. Notice the "Vulnerability Management" tab
  3. For ultimate license, the tab and its content will exist
  4. For non-ultimate license, the tab and its content will NOT exist

Mandatory Testing Requirement

This required check is to ensure we do not repeat the incident highlighted in this FCL

  1. export GITLAB_SIMULATE_SAAS=1 <- Simulate your development is GitLab.com, info
  2. git checkout 358183-fe-use-license-helper <-- this branch
  3. gdk restart
  4. Admin > Settings > General > "Account and limit" > enable "Allow use of licensed EE features"

no-error-sec-config

Note: Namespace License

If your namespace doesn't have an ultimate license, the vulnerability tab will NOT be displayed. This behavior aligns with the other configuration license check, so it's acceptable.

Admin Settings Config
2022-06-08_at_8.57_PM 2022-06-08_at_8.56_PM

One way to add the ultimate license to a namespace is through the rails console.

rails console

# Find the ultimate license id
Plan.find_by(name: 'ultimate').id # ex.6

# Get the namespace ID of your project and store it in a variable
gs=Project.find_by(name: 'Security Reports Ex').namespace.id

# Assign the license id to the namespace
gs.hosted_plan_id=6

# Save and reload
gs.save
gs.reload
Console Config Admin
2022-06-08_at_9.03_PM 2022-06-08_at_9.04_PM 2022-06-08_at_8.57_PM

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #358183 (closed)

Edited by Samantha Ming

Merge request reports

Loading