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

Enforce the domain validation when an application bind to the user domain #6860

Closed
stephdl opened this issue Feb 26, 2024 · 5 comments
Closed
Assignees
Labels
verified All test cases were verified successfully

Comments

@stephdl
Copy link

stephdl commented Feb 26, 2024

  • Install a NS8 user account domain
  • Bind application like mail, webtop, sogo to the user domain account
  • The application are listed inside the user-portal that the user can bind to all this application

Proposed solution

The code is working well but we do not verify that the user account domain exists before to bind to it, we must have a stronger behaviour and verify before to bind if the user-account exists

Alternative solutions

let the code as is

Additional context

core 2.5.2

stephdl added a commit to NethServer/ns8-core that referenced this issue Feb 26, 2024
Add domain inclusion check in bind-user-domains script NethServer/dev#6860
@stephdl stephdl self-assigned this Feb 26, 2024
@stephdl
Copy link
Author

stephdl commented Feb 26, 2024

QA

  • install core ghcr.io/nethserver/core:2.5.3-dev.5
  • install a user domain (ldap or samba ad)
  • install an application which needs to bind to this user domain (sogo, mail, webtop)
  • the application must be able to bind to this user domain without error
  • go to the user-portal, the application must be listed

@stephdl stephdl added the testing Packages are available from testing repositories label Feb 26, 2024
@DavidePrincipi DavidePrincipi removed the testing Packages are available from testing repositories label Feb 26, 2024
@github-project-automation github-project-automation bot moved this to 🆕 New in NethServer Feb 26, 2024
@DavidePrincipi DavidePrincipi moved this from 🆕 New to 🏗 In progress in NethServer Feb 26, 2024
@DavidePrincipi
Copy link
Member

@stephdl sorry for coming late at the party, but the error returned by the action should conform to other validation errors, e.g.

if realm in domains and provision == 'new-domain':
    agent.set_status('validation-failed')
    json.dump([{'field':'realm', 'parameter':'realm','value': realm, 'error':'domain_already_exists'}], fp=sys.stdout)
    sys.exit(2)

@DavidePrincipi DavidePrincipi moved this from 🏗 In progress to 👀 Testing in NethServer Feb 28, 2024
@DavidePrincipi DavidePrincipi added the testing Packages are available from testing repositories label Feb 28, 2024
@DavidePrincipi
Copy link
Member

In core 2.5.3-dev.5

@DavidePrincipi DavidePrincipi self-assigned this Mar 4, 2024
@DavidePrincipi DavidePrincipi added verified All test cases were verified successfully and removed testing Packages are available from testing repositories labels Mar 4, 2024
@DavidePrincipi
Copy link
Member

VERIFIED

@github-project-automation github-project-automation bot moved this from 👀 Testing to ✅ Done in NethServer Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
verified All test cases were verified successfully
Projects
Archived in project
Development

No branches or pull requests

2 participants