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

Identity Server (and some other) field validations #341

Merged
merged 4 commits into from
Mar 25, 2019

Conversation

htdvisser
Copy link
Contributor

Summary:

This PR addresses the Identity Server part of the missing field validations, and thereby closes #245.

Changes:

  • Validation rules for entity names (max len 50), descriptions (max len 2000) and attribute map keys (TTN ID pattern, this affects the implementation for Support Basic Station CUPS protocol #75 @adriansmares)
  • Validation of repeated enum fields for defined values
  • Validation of URL fields
  • Validation of IDs

@htdvisser htdvisser added compat/api This could affect API compatibility security This is important for security labels Mar 21, 2019
@htdvisser htdvisser added this to the March 2019 milestone Mar 21, 2019
@htdvisser htdvisser self-assigned this Mar 21, 2019
@htdvisser htdvisser requested review from johanstokking, rvolosatovs and a team as code owners March 21, 2019 16:17
@htdvisser htdvisser force-pushed the feature/245-is-validations branch from a8e9afe to e0affeb Compare March 21, 2019 17:10
@htdvisser htdvisser added the blocking release This is blocking a release label Mar 22, 2019
string name = 2;
repeated Right rights = 3;
string name = 2 [(validate.rules).string.max_len = 50];
repeated Right rights = 3 [(validate.rules).repeated.items.enum.defined_only = true];
Copy link
Contributor

@rvolosatovs rvolosatovs Mar 22, 2019

Choose a reason for hiding this comment

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

I could not figure out to do this in #194 - please check if there are other repeated enums lacking validations.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Checked. I think I got all repeated enums in this PR

@htdvisser htdvisser force-pushed the feature/245-is-validations branch from e0affeb to f21a060 Compare March 25, 2019 08:46
@htdvisser htdvisser merged commit c18583a into master Mar 25, 2019
@htdvisser htdvisser deleted the feature/245-is-validations branch March 25, 2019 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocking release This is blocking a release compat/api This could affect API compatibility security This is important for security
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add missing field validations
2 participants