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

RDAP Relation Searches Endpoint #1603

Open
wants to merge 19 commits into
base: master
Choose a base branch
from

Conversation

MiguelAHM
Copy link
Contributor

@MiguelAHM MiguelAHM commented Dec 3, 2024

This code is just for doing the controller changes.
Link relation and Extensions are not contemplated in this PR

Bottom relation pseudocode in the Jira

The status query parameter is not implemented until we have implemented administrative status task:
When status is there and inactive we should return the in region administrative resources.
In case status is active we should return non administrative in region resources.
For now just always return active resource. Ignore status query parameter. (added a TODO)

We follow the points addressed in https://datatracker.ietf.org/doc/draft-ietf-regext-rdap-rir-search/ RFC

@MiguelAHM MiguelAHM marked this pull request as ready for review December 11, 2024 11:42
@MiguelAHM
Copy link
Contributor Author

Code scanning results / CodeQL is throwing an issue not related with this PR. It is scanning the class and complaining about a regex that exist already in master. I created a task in the backlog to look into it.
It is out of scope of this PR

@MiguelAHM MiguelAHM changed the title Relation Searches Endpoint RDAP Relation Searches Endpoint Dec 24, 2024

return (ParamConverter<T>) new ParamConverter<RelationType>() {
@Override
public RelationType fromString(String relationType){
Copy link
Contributor

Choose a reason for hiding this comment

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

is it possible to add a toString method in enum for this ?

//TODO: [MH] Status is being ignored until administrative resources are included in RDAP. If status is not
// given or status is inactive...include administrative resources in the output. However, if status is active
// return just non administrative resources, as we are doing now.
if (status != null && (relationType.equals(RelationType.DOWN) || relationType.equals(RelationType.BOTTOM))){
Copy link
Contributor

Choose a reason for hiding this comment

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

use stringUtils isEmpty method to check for empty string as well

// return just non administrative resources, as we are doing now.
if (status != null && (relationType.equals(RelationType.DOWN) || relationType.equals(RelationType.BOTTOM))){
throw new RdapException("501 Not Implemented", "Status is not implement in down and bottom relation", HttpStatus.NOT_IMPLEMENTED_501);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

should we just check if status is inactive and UP and DOWN? as by default we do return active status , also add a notification status is ignored rather than sending error?


/**
* Finds all values associated with intervals that are contained within (more specific than)
* and whose prefix is higher, more specific
Copy link
Contributor

Choose a reason for hiding this comment

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

Isn't all prefix in more specific will be higher than interval? Should it be whose prefix is most higher ?

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

Successfully merging this pull request may close these issues.

2 participants