|
From: John M. <joh...@gm...> - 2014-09-26 10:41:48
|
Hello, I am using the External RA service ( http://www.ejbca.org/docs/externalra.html). I want to add extra information for an end entity, like social security number or other private information that should not appear on the certificates issued for the entity. The problem is that the *EditUserRequest*(long requestId, String username, String subjectDN, String subjectAltName, String email, String subjectDirectoryAttributes, String endEntityProfileName, String certificateProfileName, String cAName, String password, int status, int type, String tokenname, String hardtokenissuername) doesn't have a field to set the extended information. When inspecting the code for the *EditUserRequestProcessor -> MessageProcessr:* protected EndEntityInformation >> generateEndEntityInformation(AuthenticationToken admin, ExtRARequest >> submessage) throws ClassCastException, EjbcaException, >> CADoesntExistsException, AuthorizationDeniedException { > > String dirAttributes = submessage.getSubjectDirectoryAttributes(); > > ExtendedInformation ext = null; > > if (dirAttributes != null) { > > ext = new ExtendedInformation(); > > ext.setSubjectDirectoryAttributes(dirAttributes); > > } > > return new EndEntityInformation(submessage.getUsername(), > > submessage.getSubjectDN(), > > getCAId(admin,submessage.getCAName()), > > submessage.getSubjectAltName(), > > submessage.getEmail(), > > EndEntityConstants.STATUS_INPROCESS, > > new EndEntityType(EndEntityTypes.ENDUSER), > > getEndEntityProfileId(admin, >> submessage.getEndEntityProfileName()), > > >> getCertificateProfileId(submessage.getCertificateProfileName()), > > null, > > null, > > SecConst.TOKEN_SOFT_BROWSERGEN, > > 0, > > ext); > > } > > As you can see only the subjectDirAttributes are added to the extendedinformation. Is there a way to save the information on the ejbca database ? The solution I am working on right now, is to create another table on the RA database, where the Message table is located, where I put extra information for the UserData table in the EJBCA databasse. |