arcgis-python-api icon indicating copy to clipboard operation
arcgis-python-api copied to clipboard

Importing a CA certificate to Portal through a Web Adaptor results in 500 internal server error

Open esemplare opened this issue 7 years ago • 2 comments
trafficstars

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 avatar Jun 12 '18 03:06 esemplare

@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?

rwmajor2 avatar Jun 12 '18 13:06 rwmajor2

For both examples I am using the FQDN. The same that is in DNS and the hostname of the server.

esemplare avatar Jun 13 '18 15:06 esemplare

This issue is older and will be closed in an effort to remove stale issues. Please feel free to reopen if needed.

nanaeaubry avatar Sep 16 '22 05:09 nanaeaubry