def createGeoServerCatalog(service_url = "http://localhost:8080/geoserver/rest",
                           username="******",
                           password="******",
                           authcfg=None,
                           authtype=None,
                           disable_ssl_certificate_validation=False):
    # if not authcfg use basic auth
    if not authcfg or not authtype:
        catalog = GSCatalog(service_url, username, password, disable_ssl_certificate_validation)

    # if autcfg, then get certs and ca and create a PKICatalog
    else:
        certfile, keyfile, cafile = pem.getPemPkiPaths(authcfg, authtype)

        # set connection
        catalog = PKICatalog(service_url, keyfile, certfile, cafile)

        # set authcfg parameter used by uri.py functions to manage
        # uri creation with pki credential
        catalog.authcfg = authcfg

    return CatalogWrapper(catalog)