@@ -761,17 +761,21 @@ await compStatusChannel.Writer.WriteAsync(new CSVComputerStatus
761761 }
762762 }
763763
764- if ( _methods . HasFlag ( CollectionMethod . CARegistry ) ) {
764+ if ( _methods . HasFlag ( CollectionMethod . CARegistry ) )
765+ {
765766 // Collect properties from CA server registry
766767 var cASecurityCollected = false ;
767768 var enrollmentAgentRestrictionsCollected = false ;
768769 var isUserSpecifiesSanEnabledCollected = false ;
769770 var roleSeparationEnabledCollected = false ;
771+ var rPCEncryptionCollected = false ;
770772 var caName = entry . GetProperty ( LDAPProperties . Name ) ;
771773 var dnsHostName = entry . GetProperty ( LDAPProperties . DNSHostName ) ;
772- if ( caName != null && dnsHostName != null ) {
774+ if ( caName != null && dnsHostName != null )
775+ {
773776 if ( await _context . LDAPUtils . ResolveHostToSid ( dnsHostName , resolvedSearchResult . DomainSid ) is
774- ( true , var sid ) && sid . StartsWith ( "S-1-" ) ) {
777+ ( true , var sid ) && sid . StartsWith ( "S-1-" ) )
778+ {
775779 await compStatusChannel . Writer . WriteAsync ( new CSVComputerStatus
776780 {
777781 Status = ComputerStatus . Success ,
@@ -780,15 +784,19 @@ await compStatusChannel.Writer.WriteAsync(new CSVComputerStatus
780784 } ,
781785 _cancellationToken ) ;
782786 ret . HostingComputer = sid ;
783- } else {
787+ }
788+ else
789+ {
784790 _log . LogWarning ( "CA {Name} host ({Dns}) could not be resolved to a SID." , caName , dnsHostName ) ;
785791 }
786792
787- CARegistryData cARegistryData = new ( ) {
793+ CARegistryData cARegistryData = new ( )
794+ {
788795 IsUserSpecifiesSanEnabled = _certAbuseProcessor . IsUserSpecifiesSanEnabled ( dnsHostName , caName ) ,
789796 EnrollmentAgentRestrictions = await _certAbuseProcessor . ProcessEAPermissions ( caName ,
790797 resolvedSearchResult . Domain , dnsHostName , ret . HostingComputer ) ,
791798 RoleSeparationEnabled = _certAbuseProcessor . RoleSeparationEnabled ( dnsHostName , caName ) ,
799+ RPCEncryptionEnforced = _certAbuseProcessor . RPCEncryptionEnforced ( dnsHostName , caName ) ,
792800
793801 // The CASecurity exist in the AD object DACL and in registry of the CA server. We prefer to use the values from registry as they are the ground truth.
794802 // If changes are made on the CA server, registry and the AD object is updated. If changes are made directly on the AD object, the CA server registry is not updated.
@@ -800,15 +808,19 @@ await compStatusChannel.Writer.WriteAsync(new CSVComputerStatus
800808 enrollmentAgentRestrictionsCollected = cARegistryData . EnrollmentAgentRestrictions . Collected ;
801809 isUserSpecifiesSanEnabledCollected = cARegistryData . IsUserSpecifiesSanEnabled . Collected ;
802810 roleSeparationEnabledCollected = cARegistryData . RoleSeparationEnabled . Collected ;
811+ rPCEncryptionCollected = cARegistryData . RPCEncryptionEnforced . Collected ;
803812 ret . CARegistryData = cARegistryData ;
804- } else {
813+ }
814+ else
815+ {
805816 _log . LogWarning ( "The CA name or dnsHostname properties are null." ) ;
806817 }
807818
808819 ret . Properties . Add ( "casecuritycollected" , cASecurityCollected ) ;
809820 ret . Properties . Add ( "enrollmentagentrestrictionscollected" , enrollmentAgentRestrictionsCollected ) ;
810821 ret . Properties . Add ( "isuserspecifiessanenabledcollected" , isUserSpecifiesSanEnabledCollected ) ;
811822 ret . Properties . Add ( "roleseparationenabledcollected" , roleSeparationEnabledCollected ) ;
823+ ret . Properties . Add ( "rpcencryptioncollected" , rPCEncryptionCollected ) ;
812824 }
813825
814826 return ret ;
0 commit comments