Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/pci private registry create restriction tapc 584 #14492

Open
wants to merge 26 commits into
base: develop
Choose a base branch
from

Conversation

ppprevost
Copy link
Contributor

@ppprevost ppprevost commented Dec 9, 2024

Question Answer
Branch? develop
Bug fix? no
New feature? yes
Breaking change? no
Tickets Fix TAPC-584
License BSD 3-Clause
  • Try to keep pull requests small so they can be easily reviewed.
  • Commits are signed-off
  • Only FR translations have been updated
  • Branch is up-to-date with target branch
  • Lint has passed locally
  • Standalone app was ran and tested locally
  • Ticket reference is mentioned in linked commits (internal only)
  • Breaking change is mentioned in relevant commits

Description

This PR implements the "Manage Authorized IPs" feature for Manager Private Registry users. It allows users to define IP restrictions for two components: the management interface (Harbor UI) and the registry service. These restrictions cannot be set during registry creation but can be added or updated afterward through the UI.

The feature integrates with existing API endpoints to list, add, update, and remove IP restrictions. The UI now includes a "Manage Authorized IPs" button that opens a page displaying the current IP restrictions. Users can add or remove individual IPs, clear all restrictions, or use filters to manage them more effectively.

Validation is performed using the CIDR format, with a default mask of /32 if not specified. Optional descriptions for each restriction can also be added or modified. Additionally, the "Guide" button links to documentation for IP restrictions. When no restrictions are present, an onboarding page is displayed to guide users.

This update enhances security management by providing a straightforward interface for controlling registry access.

Related

@ppprevost ppprevost requested review from a team as code owners December 9, 2024 11:25
@github-actions github-actions bot added translation required feature New feature has conflicts Has conflicts to resolve before merging labels Dec 9, 2024
@ppprevost ppprevost force-pushed the feat/pci-private-registry_create-restriction_tapc-584 branch from f08bf4f to 8bda40a Compare December 12, 2024 14:11
@github-actions github-actions bot removed the has conflicts Has conflicts to resolve before merging label Dec 12, 2024
@fredericvilcot fredericvilcot force-pushed the feat/pci-private-registry_create-restriction_tapc-584 branch from 015be75 to 796da9a Compare December 13, 2024 08:59
Copy link
Contributor

@fredericvilcot fredericvilcot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a huge work 👏
Kinda hard to analyze the whole code but I wrote down some remarks 😌

@github-actions github-actions bot added the has conflicts Has conflicts to resolve before merging label Dec 17, 2024
ovh-ux-cds and others added 7 commits December 17, 2024 11:34
ref: TAPC-584
Signed-off-by: Pierre-Philippe <[email protected]>
ref: TAPC-584
Signed-off-by: Pierre-Philippe <[email protected]>
ref: TAPC-584
Signed-off-by: Pierre-Philippe <[email protected]>
ref: TAPC-584
Signed-off-by: Pierre-Philippe <[email protected]>
Pierre-Philippe and others added 18 commits December 17, 2024 11:35
ref: TAPC-584
Signed-off-by: Pierre-Philippe <[email protected]>
ref: TAPC-584
Signed-off-by: Pierre-Philippe <[email protected]>
ref: TAPC-584
Signed-off-by: Pierre-Philippe <[email protected]>
ref: TAPC-584
Signed-off-by: Pierre-Philippe <[email protected]>
ref: TAPC-584
Signed-off-by: Pierre-Philippe <[email protected]>
ref: TAPC-584
Signed-off-by: Pierre-Philippe <[email protected]>
ref: TAPC-584
Signed-off-by: Pierre-Philippe <[email protected]>
ref: TAPC-584
Signed-off-by: Pierre-Philippe <[email protected]>
ref: TAPC-584
Signed-off-by: Pierre-Philippe <[email protected]>
ref: TAPC-584
Signed-off-by: Pierre-Philippe <[email protected]>
ref: TAPC-584
Signed-off-by: Pierre-Philippe <[email protected]>
ref: TAPC-584
Signed-off-by: Pierre-Philippe <[email protected]>
ref: TAPC-584
Signed-off-by: Pierre-Philippe <[email protected]>
@ppprevost ppprevost force-pushed the feat/pci-private-registry_create-restriction_tapc-584 branch from 187efdd to 70e051e Compare December 17, 2024 10:39
@github-actions github-actions bot removed the has conflicts Has conflicts to resolve before merging label Dec 17, 2024
return result;
}

export function capitalizeAndJoin(array: string[]) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are no test associated?

ref: TAPC-584
Signed-off-by: Pierre-Philippe <[email protected]>
Copy link

sonarcloud bot commented Dec 17, 2024

Copy link
Contributor

@SimonChaumet SimonChaumet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work

import AllCheckboxComponent from '@/components/CIDR/AllCheckbox.component';
import useFilter from './useFilters';

function showCheckboxes(draft: boolean, dataLength: number): boolean {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
function showCheckboxes(draft: boolean, dataLength: number): boolean {
function shouldShowCheckboxes(draft: boolean, dataLength: number): boolean {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants