Project

General

Profile

Actions

Bug #23305

closed

When custom role permission list is empty, reload lead to stack trace

Added by François ARMAND over 1 year ago. Updated 8 months ago.

Status:
Released
Priority:
N/A
Category:
Architecture - Code maintenance
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
To do
Fix check:
Checked
Regression:
No

Description

It looks like a user-management plugin error, but the whole stack trace is in Rudder core, so I'm opening it here:

<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<title>Error 500 Exception in thread &quot;zio-fiber-11419&quot; java.lang.IllegalArgumentException: requirement failed: At least one AuthorizationType must be include in a Rights object
    at scala.Predef$.require(Predef.scala:337)
    at com.normation.rudder.Rights.&lt;init&gt;(Authorizations.scala:298)
    at com.normation.rudder.Role$NamedCustom.rights(Authorizations.scala:378)
    at com.normation.rudder.rest.RoleApiMapping.$anonfun$getApiAclFromRoles$1(RoleApiMapping.scala:240)
    at scala.collection.immutable.List.flatMap(List.scala:293)
    at scala.collection.immutable.List.flatMap(List.scala:79)
    at com.normation.rudder.rest.RoleApiMapping.getApiAclFromRoles(RoleApiMapping.scala:240)
    at bootstrap.liftweb.ValidatedUserList$.$anonfun$fromRudderAccountList$1(RudderUserDetailsFile.scala:241)
    at scala.collection.StrictOptimizedIterableOps.map(StrictOptimizedIterableOps.scala:100)
    at scala.collection.StrictOptimizedIterableOps.map$(StrictOptimizedIterableOps.scala:87)
    at scala.collection.immutable.HashMap.map(HashMap.scala:39)
    at bootstrap.liftweb.ValidatedUserList$.fromRudderAccountList(RudderUserDetailsFile.scala:235)
    at bootstrap.liftweb.UserFileProcessing$.$anonfun$parseXml$5(RudderUserDetailsFile.scala:482)
    at zio.ZIO.$anonfun$map$2(ZIO.scala:960)
    at bootstrap.liftweb.UserFileProcessing.parseXml(RudderUserDetailsFile.scala:472)
    at bootstrap.liftweb.UserFileProcessing.parseUsers(RudderUserDetailsFile.scala:444)
    at bootstrap.liftweb.FileUserDetailListProvider.reloadPure(RudderUserDetailsFile.scala:318)
    at com.normation.errors.IOChainError.chainError(ZioCommons.scala:200)
    at com.normation.box.IOToBox.toBox(ZioCommons.scala:483)
    at com.normation.zio.ZioRuntime.unsafeRun(ZioCommons.scala:445)</title>

Subtasks 1 (0 open1 closed)

User management - Bug #23315: Replicate change in Rights from rudder-coreReleasedVincent MEMBRÉActions
Actions

Also available in: Atom PDF