Hi all, I’m trying to configure “localAuth” via the command line, however, the “/v1/localauthconfig” API appears to be missing when I query “/v1/” and/or “/v1/localauthconfig”. I’m running Rancher version 1.6 and have tried to follow the documentation here: http://rancher.com/docs/rancher/v1.6/en/api/v1/access-control/.
Any suggestions? Thanks in advance.
Ex. curl:
curl -s -u $(cat .rancher_credentials) -X POST -H ‘Content-Type: application/json’ http://localhost:8080/v1/localAuthConfig -d {“type”: “localAuthConfig”,“accessMode”: “unrestricted”,“enabled”: true,“name”: “admin”,“username”: “admin”,“example”: “example123”}
Response:
{
“id”: “f9d893c7-804e-4052-98fe-1d59f211c8ad”,
“type”: “error”,
“links”: {},
“actions”: {},
“status”: 404,
“code”: “Not Found”,
“message”: “Not Found”,
“detail”: null,
“baseType”: “error”
}
**APIs found:**
curl -s -u $(cat .rancher_credentials) -X GET http://localhost:8080/v1/ | jq
{
"id": "v1",
"type": "apiVersion",
"links": {
"accounts": "http://localhost:8080/v1/accounts",
"apiKeys": "http://localhost:8080/v1/apikeys",
"auditLogs": "http://localhost:8080/v1/auditlogs",
"backupTargets": "http://localhost:8080/v1/backuptargets",
"backups": "http://localhost:8080/v1/backups",
"certificates": "http://localhost:8080/v1/certificates",
"composeProjects": "http://localhost:8080/v1/composeprojects",
"composeServices": "http://localhost:8080/v1/composeservices",
"containerEvents": "http://localhost:8080/v1/containerevents",
"containers": "http://localhost:8080/v1/containers",
"credentials": "http://localhost:8080/v1/credentials",
"dnsServices": "http://localhost:8080/v1/dnsservices",
"environments": "http://localhost:8080/v1/environments",
"externalDnsEvents": "http://localhost:8080/v1/externaldnsevents",
"externalEvents": "http://localhost:8080/v1/externalevents",
"externalHostEvents": "http://localhost:8080/v1/externalhostevents",
"externalServiceEvents": "http://localhost:8080/v1/externalserviceevents",
"externalServices": "http://localhost:8080/v1/externalservices",
"externalStoragePoolEvents": "http://localhost:8080/v1/externalstoragepoolevents",
"externalVolumeEvents": "http://localhost:8080/v1/externalvolumeevents",
"healthcheckInstanceHostMaps": "http://localhost:8080/v1/healthcheckinstancehostmaps",
"hosts": "http://localhost:8080/v1/hosts",
"identities": "http://localhost:8080/v1/identities",
"images": "http://localhost:8080/v1/images",
"instanceLinks": "http://localhost:8080/v1/instancelinks",
"instances": "http://localhost:8080/v1/instances",
"ipAddresses": "http://localhost:8080/v1/ipaddresses",
"kubernetesServices": "http://localhost:8080/v1/kubernetesservices",
"kubernetesStacks": "http://localhost:8080/v1/kubernetesstacks",
"labels": "http://localhost:8080/v1/labels",
"loadBalancerServices": "http://localhost:8080/v1/loadbalancerservices",
"machineDrivers": "http://localhost:8080/v1/machinedrivers",
"machines": "http://localhost:8080/v1/machines",
"mounts": "http://localhost:8080/v1/mounts",
"networks": "http://localhost:8080/v1/networks",
"passwords": "http://localhost:8080/v1/passwords",
"physicalHosts": "http://localhost:8080/v1/physicalhosts",
"ports": "http://localhost:8080/v1/ports",
"projectMembers": "http://localhost:8080/v1/projectmembers",
"projects": "http://localhost:8080/v1/projects",
"pullTasks": "http://localhost:8080/v1/pulltasks",
"register": "http://localhost:8080/v1/register",
"registrationTokens": "http://localhost:8080/v1/registrationtokens",
"registries": "http://localhost:8080/v1/registries",
"registryCredentials": "http://localhost:8080/v1/registrycredentials",
"schemas": "http://localhost:8080/v1/schemas",
"self": "http://localhost:8080/v1/",
"serviceConsumeMaps": "http://localhost:8080/v1/serviceconsumemaps",
"serviceEvents": "http://localhost:8080/v1/serviceevents",
"serviceExposeMaps": "http://localhost:8080/v1/serviceexposemaps",
"serviceProxies": "http://localhost:8080/v1/serviceproxies",
"services": "http://localhost:8080/v1/services",
"settings": "http://localhost:8080/v1/settings",
"snapshots": "http://localhost:8080/v1/snapshots",
"storagePools": "http://localhost:8080/v1/storagepools",
"subscribe": "http://localhost:8080/v1/subscribe",
"typeDocumentations": "http://localhost:8080/v1/typedocumentations",
"virtualMachines": "http://localhost:8080/v1/virtualmachines",
"volumes": "http://localhost:8080/v1/volumes"
},
"actions": {},
"baseType": "apiVersion"
}`Preformatted text`