admin: system api: do not show FIPS status if no valid license (#10091)
* admin: system api: do not show FIPS status if no valid license Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space> * also for outposts Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space> * black Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space> --------- Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>
This commit is contained in:
		
				
					committed by
					
						
						GitHub
					
				
			
			
				
	
			
			
			
						parent
						
							ae86184511
						
					
				
				
					commit
					b8cbdcae22
				
			@ -16,6 +16,7 @@ from rest_framework.views import APIView
 | 
			
		||||
 | 
			
		||||
from authentik import get_full_version
 | 
			
		||||
from authentik.core.api.utils import PassiveSerializer
 | 
			
		||||
from authentik.enterprise.license import LicenseKey
 | 
			
		||||
from authentik.lib.config import CONFIG
 | 
			
		||||
from authentik.lib.utils.reflection import get_env
 | 
			
		||||
from authentik.outposts.apps import MANAGED_OUTPOST
 | 
			
		||||
@ -32,7 +33,7 @@ class RuntimeDict(TypedDict):
 | 
			
		||||
    platform: str
 | 
			
		||||
    uname: str
 | 
			
		||||
    openssl_version: str
 | 
			
		||||
    openssl_fips_mode: bool
 | 
			
		||||
    openssl_fips_mode: bool | None
 | 
			
		||||
    authentik_version: str
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -71,7 +72,9 @@ class SystemInfoSerializer(PassiveSerializer):
 | 
			
		||||
            "architecture": platform.machine(),
 | 
			
		||||
            "authentik_version": get_full_version(),
 | 
			
		||||
            "environment": get_env(),
 | 
			
		||||
            "openssl_fips_enabled": backend._fips_enabled,
 | 
			
		||||
            "openssl_fips_enabled": (
 | 
			
		||||
                backend._fips_enabled if LicenseKey.get_total().is_valid() else None
 | 
			
		||||
            ),
 | 
			
		||||
            "openssl_version": OPENSSL_VERSION,
 | 
			
		||||
            "platform": platform.platform(),
 | 
			
		||||
            "python_version": python_version,
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user