arcgis-python-api
arcgis-python-api copied to clipboard
Importing a CA certificate to Portal through a Web Adaptor results in 500 internal server error
Regardless of whether there is an actual error or not, importing a CA certificate into Portal through a Web Adaptor results in 500 internal server error.
Sample code
from arcgis.gis import GIS
from arcgis.gis.admin import PortalAdminManager
portal_admin_url = "https://{}/arcportal/portaladmin".format(portal_fqdn)
gis = GIS(**gis_connection)
portal_mgr = PortalAdminManager(portal_admin_url, gis)
ssl_mgr = portal_mgr.security.ssl
res = ssl_mgr.import_certificate(ca_file, alias)
print(res) #Will print false
Setting portal_admin_url to "https://{}:7443/arcgis/portaladmin".format(portal_fqdn) results in intended behavior.
Using the Portal Admin Rest API (https://server_fqdn/arcportal/portaladmin/security/sslCertificates/importRootOrIntermediate) via the browser works fine through the Web Adaptor.
Versions: ArcGIS Version: 10.5.1 ArcGIS Python Api version 1.4.1
@esemplare Are you by any chance using a DNS alias in your example above? vs. the actual machine name you might use in the :7443 example?
For both examples I am using the FQDN. The same that is in DNS and the hostname of the server.
This issue is older and will be closed in an effort to remove stale issues. Please feel free to reopen if needed.