Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
Choose a Base Repository
juju/juju
18m-ltc/juju
1stvamp/juju
4a6f656c/juju
AdamIsrael/juju
AlexisBruemmer/juju
Argon-/juju
BryanQuigley/juju
CNXTEoEorg/juju
CSRedRat/juju
DarkDare/juju
Eeemil/juju
ExternalReality/juju
JAYSNVA/juju
KnightSecretShop/juju
LinuxDoom/juju
LinuxEntrepreneur/juju
MG-Akbar/juju
MuharremOkutan/juju
Pankov404/juju
Pekkari/juju
ProgrammerAndHacker/juju
Stasonhub/juju
Veebers/juju
abentley/juju
alesstimec/juju
allomov/juju
anastasiamac/juju
andrewdmcleod/juju
arunsingh/juju
ateleshev/juju
atombender/juju
axw/juju
aznashwan/juju
babbageclunk/juju
bac/juju
battlemidget/juju
bcsaller/juju
benileo/juju
bigsurge/juju
binary132/juju
bkuschel/juju
bloodearnest/juju
bogdanteleaga/juju
bpattewar/juju
brianalbrecht/juju
bryanl/juju
bz2/juju
ccoblis/juju
cherylj/juju
cholcombe973/juju-1
chrisglass/juju
chrisjohnston/juju
cmars/juju
dardevelin/juju
davecheney/juju
deanmaniatis/juju
devigned/juju
didrocks/juju
dimitern/juju
dooferlad/juju
dougparrish/juju
dpb1/juju
dshcherb/juju
elopio/juju
ericsnowcurrently/juju
evandandrea/juju
evilnick/juju
exekias/juju
fabricematrat/juju
felicianotech/juju
fnordahl/juju
frankban/juju
freyes/juju
frobware/juju
fwereade/juju
gabriel-samfira/juju
gitqueue/juju
gnuoy/juju
gooops/juju
hamsterksu/juju
hartsock/juju
hbcbh1999/juju
hoenirvili/juju
howbazaar/juju
imoapps/juju
ip-2014/juju
ipedrazas/juju
jameinel/juju
jiasir/juju
jimmiebtlr/juju
jisanB/juju
jjo/juju
jogeo/juju
johnsca/juju
jolestar/juju
jrwren/juju
julianwang/juju
junaid-ali/juju
jwood1/juju
kakamessi99/juju
kambyarthur/juju
kapilt/juju
kat-co/juju
kazishariar/juju
kevinnguyeneng/juju
khanchan/juju
kinganeng/juju
klyachin/juju
kryptBlue/juju
ktsakalozos/juju
leobcn/juju
linearregression/juju
lingo-reviews/juju
linux-days/juju
lucciano/juju
macduff23/juju
macgreagoir/juju
makyo/juju
marcmolla/juju
marcoceppi/juju
mattyw/juju
maximp/juju-cloudsigma
mbruzek/juju
mhilton/juju-juju
michaelkrumpe/juju
mikeaddison93/juju
mikemccracken/juju
mitechie/juju
mjs/juju
mwhudson/juju
niedbalski/juju
nobuto-m/juju
ns950/juju
optimuse/juju
packethost/juju
pdaniel-frk/juju
perrito666/juju
pmatulis/juju
pombredanne/juju
prevosis/juju
punalpatel/juju
radoslavsandov/juju
raghucse2010/juju
rastaman/juju
reddydodda/juju
reedobrien/juju
rgardler/juju
rhalff/juju
rogpeppe/juju
rowhit/juju
sagardeyrakesh/juju
samiujan/juju
sarkartanzil/juju
saydulk/juju
sean-jc/juju
sebastienpattyn93/juju
seman/juju
sfrias/juju
sidnei/juju
simonklb/juju
simudream/juju
sinzui/juju
snailwalker/juju
stgraber/juju
stub42/juju
sweetcard/juju
t0mk/juju
tasdomas/juju
tedmcox/juju
tekny/juju
th3architect/juju
thabo104/juju
theosotr/juju
thomnico/juju
tomzhang/juju
trobert2/juju
tvansteenburgh/juju
tych0/juju
uk702/juju
urosj/juju
vijaytripathi/juju
voidspace/juju
vonwenm/juju
vtapia/juju
waigani/juju
wallyworld/juju
wangmingjob/juju
watonyweng/juju
whitmo/juju
wolsen/juju
wupeka/juju
wwitzel3/juju
xiaoqing-wei/juju
xnox/juju
xushiwei/juju
yeer911/juju
zbyufei/juju
zeiv/juju
zhoutiekui/juju
Nothing to show
...
Choose a Head Repository
juju/juju
18m-ltc/juju
1stvamp/juju
4a6f656c/juju
AdamIsrael/juju
AlexisBruemmer/juju
Argon-/juju
BryanQuigley/juju
CNXTEoEorg/juju
CSRedRat/juju
DarkDare/juju
Eeemil/juju
ExternalReality/juju
JAYSNVA/juju
KnightSecretShop/juju
LinuxDoom/juju
LinuxEntrepreneur/juju
MG-Akbar/juju
MuharremOkutan/juju
Pankov404/juju
Pekkari/juju
ProgrammerAndHacker/juju
Stasonhub/juju
Veebers/juju
abentley/juju
alesstimec/juju
allomov/juju
anastasiamac/juju
andrewdmcleod/juju
arunsingh/juju
ateleshev/juju
atombender/juju
axw/juju
aznashwan/juju
babbageclunk/juju
bac/juju
battlemidget/juju
bcsaller/juju
benileo/juju
bigsurge/juju
binary132/juju
bkuschel/juju
bloodearnest/juju
bogdanteleaga/juju
bpattewar/juju
brianalbrecht/juju
bryanl/juju
bz2/juju
ccoblis/juju
cherylj/juju
cholcombe973/juju-1
chrisglass/juju
chrisjohnston/juju
cmars/juju
dardevelin/juju
davecheney/juju
deanmaniatis/juju
devigned/juju
didrocks/juju
dimitern/juju
dooferlad/juju
dougparrish/juju
dpb1/juju
dshcherb/juju
elopio/juju
ericsnowcurrently/juju
evandandrea/juju
evilnick/juju
exekias/juju
fabricematrat/juju
felicianotech/juju
fnordahl/juju
frankban/juju
freyes/juju
frobware/juju
fwereade/juju
gabriel-samfira/juju
gitqueue/juju
gnuoy/juju
gooops/juju
hamsterksu/juju
hartsock/juju
hbcbh1999/juju
hoenirvili/juju
howbazaar/juju
imoapps/juju
ip-2014/juju
ipedrazas/juju
jameinel/juju
jiasir/juju
jimmiebtlr/juju
jisanB/juju
jjo/juju
jogeo/juju
johnsca/juju
jolestar/juju
jrwren/juju
julianwang/juju
junaid-ali/juju
jwood1/juju
kakamessi99/juju
kambyarthur/juju
kapilt/juju
kat-co/juju
kazishariar/juju
kevinnguyeneng/juju
khanchan/juju
kinganeng/juju
klyachin/juju
kryptBlue/juju
ktsakalozos/juju
leobcn/juju
linearregression/juju
lingo-reviews/juju
linux-days/juju
lucciano/juju
macduff23/juju
macgreagoir/juju
makyo/juju
marcmolla/juju
marcoceppi/juju
mattyw/juju
maximp/juju-cloudsigma
mbruzek/juju
mhilton/juju-juju
michaelkrumpe/juju
mikeaddison93/juju
mikemccracken/juju
mitechie/juju
mjs/juju
mwhudson/juju
niedbalski/juju
nobuto-m/juju
ns950/juju
optimuse/juju
packethost/juju
pdaniel-frk/juju
perrito666/juju
pmatulis/juju
pombredanne/juju
prevosis/juju
punalpatel/juju
radoslavsandov/juju
raghucse2010/juju
rastaman/juju
reddydodda/juju
reedobrien/juju
rgardler/juju
rhalff/juju
rogpeppe/juju
rowhit/juju
sagardeyrakesh/juju
samiujan/juju
sarkartanzil/juju
saydulk/juju
sean-jc/juju
sebastienpattyn93/juju
seman/juju
sfrias/juju
sidnei/juju
simonklb/juju
simudream/juju
sinzui/juju
snailwalker/juju
stgraber/juju
stub42/juju
sweetcard/juju
t0mk/juju
tasdomas/juju
tedmcox/juju
tekny/juju
th3architect/juju
thabo104/juju
theosotr/juju
thomnico/juju
tomzhang/juju
trobert2/juju
tvansteenburgh/juju
tych0/juju
uk702/juju
urosj/juju
vijaytripathi/juju
voidspace/juju
vonwenm/juju
vtapia/juju
waigani/juju
wallyworld/juju
wangmingjob/juju
watonyweng/juju
whitmo/juju
wolsen/juju
wupeka/juju
wwitzel3/juju
xiaoqing-wei/juju
xnox/juju
xushiwei/juju
yeer911/juju
zbyufei/juju
zeiv/juju
zhoutiekui/juju
Nothing to show
Choose a head branch
1.20
1.21
1.22
1.23
1.24
1.25
2.0
2.1-backport-performance-fixes
2.2-introspect-help-text
006-azure-service-principal-from-azure-cli-2.2
Bug1436397-map-order
add-machine-disks
add-model-cloud
add-storage-report-names
add-unit-attach-storage
add-user-secret-key
add-user-secret-key2
add-user-secret-key3
admin-controller-model
allwatcher-remote-service
andrews-storage-world
api-application-cmd-upgradecharm-setcharm
api-cloud-credentials
api-cloud-defaultcloud
api-common-network-tests
api-modelmanager-destroymodels
api-provisioner-remove-cloudspec
api-provisioner-test-mocks
api-remoterelations
api-test-cache-timing
api-test-login-unblock-select
apierver-facades-reorg
apiserver-application-unittests
apiserver-client-environuuid
apiserver-client-vet-warning
apiserver-diskformatter
apiserver-diskmanager-fsainfo
apiserver-facade-auth-fixes
apiserver-inject-listener
apiserver-logsink-leak-2.0
apiserver-logsink-leak
apiserver-logsink
apiserver-manifold
apiserver-pinger-tests-connection-broken
apiserver-remoterelations
apiserver-restrict-login-allow-controllers
apiserver-run-pinger-other-controller
apiserver-storageprovisioner-readonly
apiserver-storageprovisioner-remove
apiserver-storageprovisioner-removeattachment
apiserver-test-logsink
apiserver-test-race
apiserver-tools-log-vet
audit-feature-test-take2
audit-feature-test
azure-ad-client
azure-allinstances-ignore-common-deployment
azure-application-password
azure-arm-configschema
azure-arm-merge-master
azure-arm-provider-ff
azure-arm-provider
azure-arm
azure-auth-authtypes
azure-auth-devicecode-ad-update
azure-auth-devicecode-part2
azure-auth-devicecode-shuffle
azure-auth-devicecode
azure-auth-resourceid
azure-auth-retries
azure-bootstrap-improvements
azure-centos
azure-cert-no-tempfile
azure-disable-release-storage
azure-fix-detach-volumes
azure-fixes
azure-generate-instancetypes-ratecardapi
azure-image-simplestreams
azure-instance-types-update
azure-isolated-networks
azure-managed-disks
azure-moar-fastar
azure-network-affinitygroup-1.20
azure-network-affinitygroup
azure-networking
azure-next-dev
azure-next
azure-rebase
azure-resources-license
azure-rolesizes-1.20
azure-rolesizes-1.21
azure-rolesizes
azure-root-disk
azure-startinstance-deployments
azure-templates
azure-update-sdk
azure-useragent
azure-vmsize-logging
azure-volume-source
azure-windows-minosdisksize
backport-fixes-2.2
backport-fixes
bootstrap-authorized-keys
bootstrap-controller-admin-model
bootstrap-controller-hosted-model
bootstrap-current-controller-early
bootstrap-detected-credential-name
bootstrap-image-feature-flag
bootstrap-initialize-state-direct-1.20
bootstrap-log-failure-first
bootstrap-timeout-propagation
bootstrap-upload-tools-no-storage
bootstrap-uploadtools-bump-build
bootstrap-waits-till-ready
bootstrapconfig-partial-ondemand-copy
bootstrapconfig-partial-ondemand
bump-names-fix-unitstorage
bump-retry-dependency
bundle-storage
caas-operator-fetch-charm
caasoperator-api
caasoperator-unit-tests
caasoperator-watch-config
caasoperatorprovisioner-test-fixes
caasoperatorprovisioner
caasunitprovisioner-api
caasunitprovisioner-wiring
caasunitprovisioner
cert-verify-drop-dnsname
certupdater-manifold
charms-environment-storage
cleaner-periodic
cli-model-owner-revertrevert
cli-model-owner
cli-volume-status
client-macaroon-login
clock-timer
cloud-credentials-accountstore
cloud-credentials-adminmodel
cloud-credentials-backuprestore
cloud-credentials-bootstrap-config
cloud-credentials-bootstrap-defaultregion
cloud-credentials-bootstrap
cloud-credentials-bootstrap2
cloud-credentials-clientstore
cloud-credentials-cloud-defaultregion-slice
cloud-credentials-cloud-defaultregion
cloud-credentials-dead-code
cloud-credentials-detect-regions
cloud-credentials-environments-yaml-no-more
cloud-credentials-fileattr
cloud-credentials-fix-lxdmaas
cloud-credentials-fixes
cloud-credentials-gce-authfile-config
cloud-credentials-jujuclient-atomicwritefile
cloud-credentials-jujuclienttesting-fix
cloud-credentials-listcontrollerscurrent
cloud-credentials-manual
cloud-credentials-modelcmd
cloud-credentials-newapiconn
cloud-credentials-nolocalprefix
cloud-credentials-prepare-jujuclient
cloud-credentials-prepareforbootstrapparams
cloud-credentials-providercredentials
cloud-credentials-rackspace-type
cloud-credentials-refactor
cloud-credentials-regions
cloud-credentials-register-backend
cloud-credentials-register-full
cloud-credentials-remove-obsolete-commands
cloud-credentials-restore-credentials
cloud-credentials-show-current
cloud-credentials-storage-endpoint
cloud-credentials-switch-noargs
cloud-credentials-switch-take2
cloud-credentials-switch
cloud-credentials-unexport-marshalling-types
cloud-credentials
cloud-creds-cleanup
cloud-facade-tests
cloud-name-2.1
cloudconfig-tools-urls
cloudinit-addfile-bytes
cloudinit-aptgetwrapper
cloudinit-download-tools-apiserver
clouds-credentials-in-state-add-model
clouds-credentials-in-state-references
clouds-credentials-in-state-take2-add-model
clouds-credentials-in-state-take2-validate
clouds-credentials-in-state-take2
clouds-credentials-in-state
clouds-update-gce-2.1
cmd-attach-storage
cmd-detach-storage
cmd-juju-cloud-listshow-regionorder
cmd-juju-commands-deploybundletimeout
cmd-juju-destroy-info
cmd-juju-destroy-machine-info
cmd-juju-removeuser-mock
cmd-juju-storage-binding-life
cmd-juju-storage-fix
cmd-juju-storage-poolcreate-args-1.24
cmd-juju-storage-poolcreate-args
cmd-juju-upgradejuju-series
cmd-modelcmd-cookie-home
cmd-remove-storage-take2
cmd-remove-storage
cmd-show-model
cmd-storage-check-application-api-version
cmd-storage-list-combined
cmd-storage-remove-machine-storage
cmd-unittest-ssh
cmd-upgradecharm-refactor-unittest
cmr-merge-master
common-firewall-fix-check-ordering
controllerinstances-controlleruuid
createmodel-cloudtag
credentials-auth-types-empty
cross-model-externalcontrollerupdater
cross-model-relations
db-annotations-tests
db-log
dblogger-buffer-config
dblogs-refactor
dependencies-charm-v5-fix
dependencies-update-charmv6
dependencies-update-description
dependencies-utils-parsesize
deploy-attach-storage
deploy-storage-volumes
destroy-controller-empty-model
destroy-controller-prompt-models
destroy-lxc-detach-loop
destroy-model-controller-destroystorage-legacy
destroy-unit-storage
destroycontroller-confirm-destroy-storage
destroyenv-destroy-storage
destroymodel-confirm-destroy-storage
develop
disable-disk-manager-1.22
disable-mongo-ssl-tests
diskformatter-update-size
diskmanager-ignore-floppy-disks
diskmanager-lsblk-mointpoint
drop-gsamfira-sys-fork
drop-gui-compat
drop-persistent-storage-ff
ebs-describevolumes
ebs-limits-1.25
ebs-limits
ec2-blockdevicemapping-allephemeral
ec2-blockdevicemapping-validation
ec2-default-instance-type
ec2-ebs-detach-fixes
ec2-euwest3-region
ec2-instancetypes-generate
ec2-tags
ec2-update-cloud-instancetypes
ec2-useast2-instancetypes
ec2-volume-ids
ensure-ha-existing
ensurenotbootstrapped-stateserverinstances
environ-bootstrap-upload-tools
environ-destroy-hosted-models-azure
environ-destroy-hosted-models-ec2
environ-destroy-hosted-models-openstack
environ-destroy-hosted-models
environ-stateserverinstances
environ-storage-provisioner
environ-upgrades
environ-version
environprovider-prepareconfig
environs-cloudspec-min
environs-cloudspec-min2
environs-cloudspec
environs-destroy-notfound
environs-environ-drop-bootstrapmessage
environs-instances-matchinginstancetypes
environs-openparams
environs-prepareforbootstrap
environs-remove-storage
environs-startinstanceresult
environs-sync-tests-mockbuild
environs-tools-archive
excise-rsyslog
external-provider
extract-state_storage_txn
feature-persistent-storage-merge-develop
feature-persistent-storage
filesystem-status
finalize-credential-cloud
firewaller-environ-tracker
firewaller-fix-cmr-tests
fix-data-races
fix-go1.8-juju1.25
fix-go1.8-juju2.1
fix-iptables-firewalling-2.3
fix-iptables-firewalling
fix-race-globalclockupdater
fix-test-races
fix-tests-mgo-leakage-1.20
fix-tests-mgo-leakage
fix-unittests-go1.8
fix_1271144-1.20
gce-aggregated-list-disks
gce-australia-southeast1
gce-jsonfile-hack
gce-logger
gce-release-storage
gce-volume-zones
global-clock-leases
google-add-regions
govendor
guibundles-storage
guibundles
image-metadata-envstorage
import-storage-review-fixes-take2
import-storage-review-fixes
instance-delete-refresh
instance-storage-specification
instancecfg-restructure
instancepoller-cache-instanceid
instancepoller-setprovideraddresses-machinedead
introspection-https-endpoint
introspection-prometheus-metrics
introspection-scripts-curl-2.2
introspection-scripts-curl
juju-1.24-lp1496750-ensure-HTTP-resp-Body-will-always-get-closed
juju-2.0-storage-cli-api
juju-api-external-auth
juju-fix-charmv5-commit
juju-logout
juju-remove-cloud
juju-switchuser
juju-unregister-controller
jujuc-jujurpc-stdio
jujuclient-currentcontroller
jujuclient-fix-modelupdate
jujuclient-models-per-user
jujuclient-remove-identical-controllers
jujuclient-testcoverage
jujuconnsuite-dont-remove-admin
jujud-singular-controller
jujutxn-prune-update-2.0
jujutxn-prune-update
leadership-remove-old-1.24
lease-state-proto
lease-tomb-hotswap-leadership
list-controllers-cloud
listmodels-dying-dead
logging-log-forwarding-worker
login-external-user
login-local-macaroon-part1
login-local-macaroon-part2
login-local-macaroon-part3
login-local-macaroon-part4
login-local-macaroon
loginv3
logsender-fix-race
logsink-ratelimit-2.2
logsink-ratelimit
lp1215579-relation-address-changed
lp1250007-azure-sanity-check-cert
lp1259947-azure-vnet-location
lp1289815-address-change-delta
lp1293697-jujuconnsuite-closeorder
lp1316185-ssh-keepalive-1.20
lp1316185-ssh-keepalive
lp1319474-update-godeps-goamz
lp1324910-azure-destroy-agvnet
lp1325830-maas-destroy-containers
lp1327940-prealloc-oplog
lp1330162-openstack-az-notimplemented
lp1330163-ec2-constrained-az
lp1330163-ec2-moar-constrained-az
lp1334273-upgrade-ha-race-1.20
lp1334273-upgrade-ha-race
lp1334531-dont-leak-apistate
lp1334773-state-address-networkscope-1.20
lp1334773-state-address-networkscope
lp1338179-local-oplog-1.20
lp1338179-local-oplog
lp1338511-machineagent-ensuremongoserver-already-1.20
lp1338511-machineagent-ensuremongoserver-already
lp1339240-mongo-replset-retry-1.20
lp1339240-mongo-replset-retry
lp1342725-hardcode-ubuntu-paths
lp1344940-oplog-smaller-1.20
lp1344940-oplog-smaller
lp1345014-jujud-wait-provisioned-1.20
lp1345014-jujud-wait-provisioned
lp1345832-nochange-nosetapihostports-1.20
lp1345832-nochange-nosetapihostports
lp1345832-stable-sorthostports
lp1347371-worker-provisioner-jobs
lp1347715-manual-stateserverinstances-noverifyinenv
lp1347715-provider-manual-open
lp1347715-provider-manual-prepare
lp1347715-provider-manual-stateserverinstances-ignore-stderr
lp1350700-mongo-install-mongodb-always-1.20
lp1350700-mongo-install-mongodb-always
lp1351101-azure-mongo-bootstrap
lp1351101-bootstrap-longsockettimeout-master
lp1351101-bootstrap-longsockettimeout
lp1356886-manual-fail-forcedestroy
lp1358768-provider-maas-i386
lp1360605-maas-zones
lp1361971-bootstrap-generate-systemidentity
lp1362072-azure-verify-credentials-1.21
lp1362072-azure-verify-credentials
lp1362072-provider-verify-credentials-ec2
lp1362072-provider-verify-credentials-maas
lp1362072-providers-verify-credentials
lp1362990-cmd-jujud-runtests-timeout
lp1363130-manual-default-os-update
lp1363143-local-no-tools-in-cloudcfg
lp1364200-aptmirror-config
lp1364438-curl-download-tools
lp1365135-maas-supported-architectures
lp1366650-bootstrap-no-log-redirection
lp1370781-upgradejuju-pinned-1.20
lp1370781-upgradejuju-pinned
lp1371605-provider-openstack-keystoneurl
lp1372961-ec2-tests-i386
lp1381289-azure-boilerplate-consistency
lp1384259-aptget-lock-retry-1.22
lp1384259-aptget-lock-retry
lp1385289-upgrade-toolsstorage-notools
lp1387421-juju-help-placement
lp1387766-juju-scp-username
lp1388860-ec2-nodefaultsubnet-1.21
lp1388860-ec2-nodefaultsubnet
lp1389037-ec2-az-InsufficientInstanceCapacity-1.21
lp1389037-ec2-az-InsufficientInstanceCapacity
lp1391645-uniter-tools-symlinks-1.21
lp1391645-uniter-tools-symlinks
lp1392411-maas-azretry-break-1.21
lp1392411-maas-azretry-break
lp1394976-api-uniter-charmarchiveurls
lp1398406-azure-dseries
lp1400348-certupdater-jujuapiserver
lp1417178-azure-restore
lp1420049-lxc-broker-filter-tools
lp1420049-lxc-provisioner-override-constraints-arch-1.22
lp1420049-lxc-provisioner-override-constraints-arch
lp1430049-state-isnotassigned-errcause
lp1439375-instancepoller-logger
lp1444912-errterminateagent-nouninstall-1.25
lp1444912-errterminateagent-nouninstall
lp1450740-cinder-size
lp1452207-uniter-storage-delay-provision
lp1454481-diskmanager-ignore-non-diskloop-master
lp1454481-diskmanager-ignore-non-diskloop
lp1454678-jujuc-stdin-1.24
lp1454678-jujuc-stdin-take2-1.24
lp1454678-jujuc-stdin-take2-master
lp1455224-lsblk-ordering
lp1456265-openstack-no-swift-keystone
lp1456265-openstack-no-swift
lp1461871-state-assertions-1.22
lp1461871-state-struct-assertions-master
lp1461871-state-struct-assertions
lp1464304-terminate-uninstall-1.25
lp1464304-terminate-uninstall
lp1464335-rsyslog-local-cacert-exists
lp1466969-apiserver-provisioner-facadev0-master
lp1466969-apiserver-provisioner-facadev0
lp1469130-amz-signing-tools-migration-master
lp1469130-amz-signing-tools-migration
lp1470820-drop-gsamfira-sys-fork
lp1474614-rsyslog-upgrade-1.24.2
lp1474788-ec2-retry-createtags-notfound-master
lp1474788-ec2-retry-createtags-notfound
lp1475212-destroy-env-persistent-volumes
lp1475212-destroy-model-manual-machines
lp1475212-manual-destroy-uninstall
lp1476895-ec2-tag-root-disk
lp1477263-provider-local-destroy-race
lp1477355-fix-windows-build
lp1477355-runninginsidelxc-notlinux
lp1479024-provider-ec2-testrootdisk-order
lp1483082-maas-physical-disks-hardwareid
lp1483086-storage-managedfs-fulldisk
lp1483492-storageprovisioner-filter-scope-1.25
lp1483492-storageprovisioner-filter-scope
lp1494121-remotestate-datarace-test
lp1494542-worker-uniter-runcommands-queue
lp1494542-worker-uniter-runcommands
lp1495338-filesystemdetails-storagedetails
lp1495338-forward-port-master
lp1495338-storage-cli
lp1495338-storage-params
lp1495338-storagedetails
lp1495338-volumedetails-storagedetails
lp1495338-volumelist-format
lp1495542-debugging-uniter
lp1495542-uniter-ru-settings-version-cmp
lp1495978-manual-provision-centos7
lp1497229-apiserver-kill-presence-pinger
lp1498481-state-addservice-settings-fix
lp1498746-volume-storageattachmentinfo-busaddr-master
lp1498746-volume-storageattachmentinfo-busaddr
lp1500703-gce-hardwareid-1.25
lp1500703-gce-hardwareid
lp1500721-ebs-devicename-numbers-1.25
lp1500721-ebs-devicename-numbers
lp1500769-gce-default-block-source-1.25
lp1500769-gce-default-block-source
lp1500803-gce-disk-google-prefix-1.25
lp1500803-gce-disk-google-prefix
lp1501173-storageattachmentinfo-require-blockdevice-1.25
lp1501173-storageattachmentinfo-require-blockdevice
lp1501398-mongotest-dialopts
lp1501559-ec2-tag-root-disk-timeout-1.25
lp1501559-ec2-tag-root-disk-timeout
lp1501710-storageprovisioner-validatevolumeparams-1.25
lp1501710-storageprovisioner-validatevolumeparams
lp1505504-clear-current-model
lp1509032-whitespace-trim
lp1516144-assignunit-remove
lp1520380-remove-lxd-containertype
lp1524077-azure-subnet-name
lp1524527-deploy-multiseries-to
lp1526296-state-reject-incompatible-os
lp1527681-azure-firewall
lp1528259-undertaker-atomic-align
lp1533275-cloudconfig-download-tools-infinite-retries
lp1540394-azure-toomanyrequests
lp1548799-ssh-windows
lp1551779-azure-agent-mirror
lp1553292-cmd-pprof-inject-path
lp1555430-bootstrap-setmoedlname-canonical
lp1558678-manual-prepareforcreateenvironment
lp1558769-azure-createmodel
lp1560428-cmdjujucommon-gocheck
lp1569490-storageget-panic
lp1570269-state-model-getstate
lp1570883-oncemorewithfeeling
lp1570883-stringforwarder-again
lp1570883-stringforwarder-timesensitive
lp1571476-register-generate-macaroon
lp1571478-login-prompt-only-once
lp1571832-tools-layered
lp1571901-changeuserpassword-nogenerate
lp1571982-azure-centos
lp1572781-lxd-tools
lp1575463-dependencies
lp1576509-api-uploadcharm-closebody
lp1576509-http-race
lp1576750-cloud-config
lp1576911-environs-bootstrap-buildtoolstarball
lp1578456-commands-tests-mainexit
lp1580423-identity-endpoint
lp1585836-azure-race
lp1587644-fixes-backport
lp1589748-prompt-login
lp1593033-manual-maas-magic-endpoint
lp1595617-subordinate-storage
lp1598286-fix-syslog-config
lp1599503-upgradecharm-remove-unused-optional-storage-1.25
lp1599503-upgradecharm-remove-unused-optional-storage
lp1600237-instancecfg-no-authorized-keys
lp1600539-1.25-diskmanager-sortdevicelinks
lp1602732-gce-bootstrap-apiport
lp1603208-bootstrap-config-test-windows
lp1603596-query-storage-account
lp1604106-update-azure-sdk
lp1607557-fix-cloud-serialization
lp1610243-bootstrap-hostedmodel-create
lp1611453-manual-destroy-systemd
lp1612335-azure-errors
lp1612645-ec2-apsouth1
lp1612836-apicaller-waitlonger
lp1614749-instancepoller-notprovisioned
lp1615095-openstack-cinder-storageprovidertypes
lp1615601-openstack-machine-name
lp1616346-lxd-remove-certs
lp1618636-lxd-config
lp1618809-google-instance-types
lp1622531-cloudinit-curl-connect-timeout
lp1622531-cloudinit-download-tools-parallel
lp1623485-azure-race
lp1625768-state-test-deadlock
lp1625768-update-testing-dependency
lp1626784-upgradejuju-version-autoupload
lp1628206-state-singularworker-restart
lp1631145-upgradecertificatednsnames
lp1631216-ec2-invalidendpoints
lp1633788-lxd-bridged-2.1
lp1633788-lxd-bridged-addmodel-detectcredentials-2.1
lp1633788-lxd-bridged-addmodel-detectcredentials
lp1633788-lxd-bridged-detectclouds
lp1633788-lxd-bridged
lp1636648-openstack-update-goose
lp1637819-run-multiple-args
lp1638332-juju-run-timeout
lp1642385-lxd-client-proxy
lp1642630-azure-update-clouds
lp1642795-rackspace-filter-diskless-flavors
lp1645729-watcher-dispose-1.25
lp1645729-watcher-dispose-2.0
lp1645729-watcher-dispose
lp1649647-vsphere-terminology
lp1650304-bridge-multiple-iface-stanzas
lp1656243-lxd-debug-trace
lp1656723-azure-firewaller
lp1657448-azure-utf8-bom-2.1
lp1657448-azure-utf8-bom
lp1658830-azure-noauthkeys
lp1661091-lxd-cache-certs
lp1661458-lxd-addcert-concurrently
lp1661506-cmd-config-single-key
lp1662587-lxd-add-credential-interactive
lp1667883-destroy-machine-bound-storage
lp1669072-vmware-unique-hostname
lp1669483-vsphere-instances-notfounderror
lp1671258-who-needs-indexes-anyway
lp1674148-storage-already-attached-2.2
lp1674148-storage-already-attached
lp1677001-maas-idpath
lp1691886-backupre-restore-ssh
lp1692729-storage-instance-record-constraints
lp1695894-undertaker-dont-ignore-errors
lp1696539-errrefresh-is-errbounce
lp1698989-api-dial-with-proxy
lp1700860-add-storage-inherit-constraints
lp1701142-destroy-object-not-found
lp1701438-worker-apicaller-timeout
lp1705961-default-storage-provider
lp1706340-one-lease-manager
lp1717590-dependencies-mutex-again
lp1719323-openstack-volume-type
lp1722818-destroymachine-removefilesystemattachments
lp1722818-removemachinefilesystems-destroy-backing-volumes
lp1724230-add-machine-ssh-no-winrm
lp1727162-remote-relations-refcount
lp1728972-upgrade-leases-before-use
lp1729097-google-asia-south1
lp1732021-maas-selectnode-zone
lp1732233-uniter-debug-hooks-exitstatus
lp1732564-start-instance-error
lp1732616-volume-events-incoherent
lp1733250-login-validation
lp1733708-delete-status-history-batches
lp1733756-openstack-volume-notfound
lp1734221-pty-auto
lp1734725-addmodel-region
lp1737107-add-relation-status
lp1739380-close-mgo-iterators
lp1740815-juju-status-model-not-found
lxd-endpoints
lxd-hostfs-storage
lxd-remove-model-config
lxd-restricted-config
lxd-storage-default-pools
lxd-storage-remove-feature-flag
lxd-storage
lxd
lxdclient-storage
maas-storage-fixes
machine-agent-upgrade-ha-robustness-1.20
machine-agent-upgrade-ha-robustness
machine-firewaller
machine-provisioner-disks
maltese-falcon-cleanup
maltese-falcon
managedfs-partition
manual-bootstrap-host-placement
manual-drop-usesshstorage
master
merge-2.2-develop
mgo-debug-2.2
mgo-stats-collector
moar-test-cleanup
model-dying-dead-removed
modelcmd-errors-moar-human
modelcmd-modelcommandbase-currentcontroller
modelmanager-configskeleton-for-gui
modelmanager-fix-admin-name-check
modelupgrader-setstatus
modelworkermanager-manifold
mongo-bakerystorage
mongo-journalenabled
mongo-manifold
mongo-postdial-setsafe
mongo-selectpeer-nonlocal
mongo2.6-compat
mongometrics
more-1.8-failures
move-environs-prepare
move-roundtripper-master
next
no-more-legacy-azure-cc
no-more-legacy-azure
no-verifystorage-take2
no-verifystorage
open-state-mongo-session
openstack-disable-version-discovery
openstack-import-volume
openstack-legacy-nova-networking
openstack-networking-interfaces
openstack-release-storage
openstack-update-goose
openstack-volume-zones
oracle-release-import-volumes
parse-kubeconfig-cert-paths
patch-mgo-txn-flusher
patches-1.25
peergrouper-fixes
peergrouper-manifold
peergrouper-test-race-dotestforipv4andipv6
persistent-storage-feature-flag
persistent-storage-volume-availzones
prealloc-fix-vet
precheck-volumeattachments
prepareconfigparams-nocontroller
prometheus-state-metrics
provider-azure-cloudsigma-vsphere-credentials
provider-azure-stateserverinstances-tags
provider-common-providerstate
provider-common-tests-windows
provider-ec2-ebs-createvolumes-noattach
provider-ec2-tag-resources
provider-ec2-zone-placement
provider-ec2-zone-spread
provider-gce-no-sshkeys-metadata
provider-local-bindmount
provider-lxd-centos-support
provider-maas-hardwarecharacteristics
provider-manual-fix-pr429
provider-open-cloudspec-part1
provider-open-cloudspec-part2
provider-open-cloudspec-part3
provider-open-cloudspec-part4
provider-open-cloudspec-part5
provider-open-cloudspec
provider-openstack-cinder-fixes-1.24
provider-openstack-cinder-fixes
provider-openstack-goose-logging
provider-openstack-tag-resources
provider-openstack-zone-placement
provider-openstack-zone-spread
provider-vsphere-bootstrap-zone
provisioner-storage-constraints
provisioner-tools-api
provisioning-doc-az
provisioningscript-apiaddrs-state
rackspace-region-case
raft
refactor-statepolicy-and-environ
refactor-statepolicy
register-updateaccount
reject-tools-invalid-series
release-storage-client-worker-provider
release-storage-controller
release-storage
remoterelations-backend-part2
remoterelations-backend-part3
remoterelations-backend-part4
remove-diskformatter
remove-environs-storage
remove-environs-tools-findinstancetools
remove-instance-dnsname
remove-storage-attached-error
remove-unit-application-destroy-storage
replicaset-begone
replicaset-testing-no-juju
replset-always
resolver-cleanups
resource-tags-units-storagename-etc
resource-tags
resources-state-resourcemanager
resources
restorer-manifold
revert-414-state-remove-setmongopassword
revert-5245-azure-isolated-networks
rootfs-provisioner
rpc-context
rpc-opentracing
rsyslog-queue-maxdiskspace-1.22
rsyslog-queue-maxdiskspace-1.23
rsyslog-queue-maxdiskspace-1.24
rsyslog-queue-maxdiskspace
run-codecoroner
separate-bootstrap-config
separate-region-endpoint-model-config-take2
separate-region-endpoint-model-config
service-sort-command
service-storage
service-systemd-environment-1.23
service-systemd-environment-1.24
service-systemd-environment
shared
show-controller-bootstrap-config
showcontroller-nobootstrapconfig
simplestreams-close-body-moar-cleaner
simplify-config-controller-take2
simplify-config-controller
simplify-config
sm-ds-require-signed
ssh-stricthostkeychecking
sshinit-runconfigurescript-buffered
statate-machinestorage-machineensuredeadnostorage
state-addapplication-attachstorage
state-addtoset-storage-oneaddtoset
state-api-common-watch
state-application-addunit-params
state-applicationoffers-remove-consistency-race
state-assignunit-operation
state-backup-gofmt
state-caas-addunit
state-cloud-collection
state-container-spec
state-controller-refactor-merge-develop
state-datastores
state-destroy-application-remove-offers
state-disk-provision-take2
state-disk-provision
state-filesystem-moar
state-filesystem-no-conflicts
state-filesystem
state-fix-lease-test
state-gvt
state-interface
state-lease-claimers-restart
state-lease-clockless
state-machine-setblockdevices
state-machinestorage-binding
state-machinestorage-dead
state-machinestorage-detach-destroy
state-machinestorage-setinfo-id
state-manager
state-migration-storage-no-owner
state-modeldestroy-destroystorage
state-multiple-storage-filesystem-location
state-newstate-stopwatchers
state-nosetunsetempty
state-notprovisioned-errors
state-openparams
state-remove-formodel
state-remove-setmongopassword-take2
state-remove-setmongopassword
state-remove-state-txn-again
state-service-setcharm-checkstorage-1.24
state-setapihostports-ifchange-1.20
state-setapihostports-ifchange
state-setcharm-cleanup
state-setstorageinfo
state-settings-version
state-share-txnlogwatcher
state-storage-attachments-order
state-storage-lifebinding
state-storage-lifecycle
state-storage-min-max-constraints
state-storage-model-2.2
state-storage-model-binding
state-storage-move
state-storage-placement-1.24
state-storage-refactor
state-storage-setcharm-storageconstraints-take2
state-storage-setcharm-storageconstraints
state-storageconstraints-per-charmurl
state-tools-catalogue
state-tools-take2
state-toolstorage-addtools-remove-old
state-toolstorage-formodelbegone
state-toolstorage
state-tracker-pool
state-txn-metrics
state-updatemachine-operation
state-volume-backed-filesystem-scope
state-volume-backed-filesystems
state-volumefilesystem
state-watcher-experimental
state-watchremote
state-worker-manifolds
state-workers-restart
statemetrics-statepool
status-filtering-noresolve
statushistorypruner-racy-tests
storage-add-bug1462146
storage-allwatcher
storage-attachment-removal-1.24
storage-attachment-removal
storage-blockdevice-path-unix
storage-config-persistent-nomore
storage-config-schema-master
storage-config-schema
storage-constraints
storage-containers
storage-createvolumes-persistent-attached
storage-detached-detaching-1.24
storage-directive
storage-dynamic
storage-environ-provider
storage-errors
storage-feature-flag-1.24
storage-filesystem-cmd
storage-filesystem-cmd2
storage-filesystem-cmd3
storage-filesystem-default-block-source
storage-filesystem-interface
storage-filesystemsource-destroyfilesystems
storage-import-filesystem
storage-importfilesystem-helptext
storage-lifecycle-constraints
storage-list-filter-storage-name-1.25
storage-list-filter-storage-name
storage-list-panic
storage-list-show-tweaks
storage-list-tabular
storage-list-volumes
storage-managedfs
storage-misc-changed
storage-model-doc
storage-model-revamp
storage-model-uml-update
storage-no-fs-prefs
storage-params-info-separate
storage-provider-detachfilesystems
storage-provider-interface
storage-provider-loop-detach
storage-provider-loop-lxc-persistent
storage-provider-loop
storage-providers
storage-provisioner-ebs-dynamic
storage-readonly
storage-reattachment-master
storage-reattachment
storage-rejigger-types
storage-scope
storage-serial-hwid-1.24
storage-serial-hwid
storage-sortblockdevices-contents
storage-syfs-info
storage-volume-detach
storageattachment-watcher-1.24
storageattachment-watcher-master
storageprovisioner-api-attachments
storageprovisioner-api-blockdevices
storageprovisioner-api-changes
storageprovisioner-clear-pending-attachments
storageprovisioner-destroy-filesystems
storageprovisioner-destroy
storageprovisioner-environtracker
storageprovisioner-filesystem-3
storageprovisioner-filesystem-attachments-2
storageprovisioner-filesystem-attachments
storageprovisioner-filesystem-schedule
storageprovisioner-filesystem-schedule2
storageprovisioner-filesystem-schedule3
storageprovisioner-race
storageprovisioner-reschedule-destroy
storageprovisioner-reschedule-failures
storageprovisioner-watch-storage
storageprovisioner-watchmachinefilesystems
storaginfo-ondemand
structured-metadata-bootstrap
structured-metadata-moved-roundripper
structured-metadata-provider-images-cloudsigma
structured-metadata-provider-images-gce
structured-metadata-provider-images-joyent
structured-metadata-provider-images-legacy-azure
structured-metadata-provider-images-maas
structured-metadata-provider-images-openstack
structured-metadata-provider-images
structured-metadata-save-list-atomic
structured-metadata
support-mongo2.6-min
support-mongo2.6
synctools-api
tag-s-disktag-volumetag
test-uniter-relations-leadersettingschanged
tmpfs-provider
tools-download-moar-logging
tools-metadata-cleanup-1.25
tools-metadata-no-provider-storage
tools-stream-1.20
uas_status_set_service
uniter-cache-principalname
uniter-ensuredeadremove-api
uniter-jujuc-storage-list
uniter-reboot-priority-before-kill
uniter-refactor-hooksource
uniter-remote-state
uniter-resolver-loop-localstate
uniter-resolver-upgrade
uniter-retry-hook-timer
uniter-runner-debug-simpler
uniter-solver
uniter-storage-attachments
uniter-storage-complete
uniter-storage-get
uniter-storage-hooks-feature
uniter-storage-hooks-hax
uniter-storage-hooks
uniter-storage-part2
uniter-storage-source
uniter-storage-state
uniter-storage
uniter-storager
uniter-testuniterupgradeconflict-intermittent
uniter-upgrade-conflicts
uniter-upgrade-loop-error
uniter-watchaddresses
uniter-watchstorageattachment
unnecessary-environ-usage
update-contributing-develop-branch
update-dependencies-mutex
update-goose-dep
update-mgo-gopkgin
update-utils-dependency
upgrade-distro-info-1.25
upgrade-distro-info-master
upgrade-model-info
upgrade-status
upgrade-toolstorage
upgrader-tools
upgrades-image-metadata
upgrades-migratecharmstorage-ignoreunused-1.25
upgrades-migratecharmstorage-ignoreunused
upgrades-remove-pre126
upgrades-steps-121a2
upload-tools-extra-series
use-godep
vendor-mgo
volume-backed-filesystems
volume-status
volumesource-api-bulk-errors
vsphere-cache-images
vsphere-cache-vmdk
vsphere-datastore-config
vsphere-datastore-omit
vsphere-drop-gccgo-build-tag
vsphere-fixes
vsphere-folder-truncate-model-name
vsphere-folders
vsphere-improvements
vsphere-instance-status
vsphere-internal-vsphereclient
vsphere-network-config-2.2
vsphere-network-config
vsphere-test-fixes
vsphere-update-govmomi
vsphere-use-vsphereclient
wallyworld-mongo-socket-pool-limit
watch-machine-filesystems-volumeattachmentchange
watch-machine-storage
wireup-diskmanager
worker-apiserver-fix-test-race
worker-diskformatter-finito
worker-diskformatter
worker-diskmanager-ignorepart
worker-diskmanager
worker-instancepoller-fakeclock
worker-leadership-handle-cancelled
worker-machiner-unit-tests
worker-modelupgrader-modelregistry
worker-modelupgrader
worker-mounter
worker-peergrouper-unit-tests
worker-remoterelations-pushonly
worker-remoterelationsworker
worker-rsyslog-confdir
worker-storage
worker-storageprovisioner-destroy-volumes
worker-storageprovisioner-detach
worker-storageprovisioner-detachfilesystems-order
worker-storageprovisioner-filesystems
worker-uniter-filtertest-race
worker-uniter-refactorsource
worker-uniter-storageattached-first-1.24
worker-uniter-waithooks-longwait
wrench-trace-1.25
wrench-trace-logging
Nothing to show
Checking mergeability… Don’t worry, you can still create the pull request.
  • 1 commit
  • 44 files changed
  • 0 commit comments
  • 1 contributor
Commits on Sep 07, 2016
axw
Overhaul local login macaroon auth
This is a long overdue overhaul of the local
login macaroon authentication in Juju, bringing
macaroon authentication for local users in line
with how we do it for external users.

The controller now acts as a discharger for
macaroons authenticating local users. When you
first attempt to connect without a password you
will be handed a macaroon with the location
pointing back at the controller. The client
has a special "web-page" visitor which can
interact with the controller to obtain a caveat
discharge macaroon with which it can authenticate.

The macaroon field in accounts.yaml has been
dropped, in favour of storing macaroons only in
the cookie jar ($JUJU_COOKIEFILE or ~/.go-cookies).

There is currently no browser-based login page
for local users, though this could be added later.

Fixes https://bugs.launchpad.net/juju/+bug/1603176
Showing with 1,326 additions and 586 deletions.
  1. +14 −0 api/authentication/package_test.go
  2. +63 −0 api/authentication/visitor.go
  3. +88 −0 api/authentication/visitor_test.go
  4. +5 −0 api/interface.go
  5. +16 −1 api/state.go
  6. +0 −25 api/state_test.go
  7. +0 −21 api/usermanager/client.go
  8. +10 −2 apiserver/admin.go
  9. +202 −7 apiserver/apiserver.go
  10. +123 −19 apiserver/authcontext.go
  11. +136 −0 apiserver/authentication/interactions.go
  12. +164 −0 apiserver/authentication/interactions_test.go
  13. +103 −65 apiserver/authentication/user.go
  14. +27 −36 apiserver/authentication/user_test.go
  15. +1 −0 apiserver/controller/controller_test.go
  16. +4 −4 apiserver/export_test.go
  17. +3 −2 apiserver/httpcontext.go
  18. +0 −8 apiserver/params/registration.go
  19. +39 −24 apiserver/registration.go
  20. +12 −6 apiserver/root.go
  21. +36 −25 apiserver/tools_test.go
  22. +10 −56 apiserver/usermanager/usermanager.go
  23. +4 −15 apiserver/usermanager/usermanager_test.go
  24. +32 −8 cmd/juju/commands/migrate.go
  25. +85 −13 cmd/juju/commands/migrate_test.go
  26. +12 −6 cmd/juju/controller/register.go
  27. +0 −8 cmd/juju/controller/register_test.go
  28. +13 −28 cmd/juju/user/change_password.go
  29. +4 −46 cmd/juju/user/change_password_test.go
  30. +5 −24 cmd/juju/user/login.go
  31. +6 −20 cmd/juju/user/login_test.go
  32. +1 −1 cmd/juju/user/logout.go
  33. +4 −8 cmd/juju/user/logout_test.go
  34. +7 −13 cmd/juju/user/user_test.go
  35. +12 −8 cmd/modelcmd/apicontext.go
  36. +62 −31 cmd/modelcmd/base.go
  37. +0 −17 cmd/modelcmd/base_test.go
  38. +0 −5 cmd/modelcmd/modelcommand.go
  39. +1 −2 featuretests/cmd_juju_login_test.go
  40. +10 −1 featuretests/cmd_juju_register_test.go
  41. +9 −19 juju/api.go
  42. +0 −5 jujuclient/interface.go
  43. +0 −4 jujuclient/validation.go
  44. +3 −3 resource/cmd/list_charm_resources.go
@@ -0,0 +1,14 @@
+// Copyright 2016 Canonical Ltd.
+// Licensed under the AGPLv3, see LICENCE file for details.
+
+package authentication_test
+
+import (
+ "testing"
+
+ gc "gopkg.in/check.v1"
+)
+
+func TestPackage(t *testing.T) {
+ gc.TestingT(t)
+}
@@ -0,0 +1,63 @@
+// Copyright 2016 Canonical Ltd.
+// Licensed under the AGPLv3, see LICENCE file for details.
+
+package authentication
+
+import (
+ "encoding/json"
+ "net/http"
+ "net/url"
+
+ "github.com/juju/errors"
+
+ "gopkg.in/macaroon-bakery.v1/httpbakery"
+)
+
+const authMethod = "juju_userpass"
+
+// Visitor is a httpbakery.Visitor that will login directly
+// to the Juju controller using password authentication. This
+// only applies when logging in as a local user.
+type Visitor struct {
+ username string
+ getPassword func(string) (string, error)
+}
+
+// NewVisitor returns a new Visitor.
+func NewVisitor(username string, getPassword func(string) (string, error)) *Visitor {
+ return &Visitor{
+ username: username,
+ getPassword: getPassword,
+ }
+}
+
+func (v *Visitor) VisitWebPage(client *httpbakery.Client, methodURLs map[string]*url.URL) error {
+ methodURL := methodURLs[authMethod]
+ if methodURL == nil {
+ return httpbakery.ErrMethodNotSupported
+ }
+
+ password, err := v.getPassword(v.username)
+ if err != nil {
+ return err
+ }
+
+ // POST to the URL with username and password.
+ resp, err := client.PostForm(methodURL.String(), url.Values{
+ "user": {v.username},
+ "password": {password},
+ })
+ if err != nil {
+ return err
+ }
+ defer resp.Body.Close()
+
+ if resp.StatusCode == http.StatusOK {
+ return nil
+ }
+ var jsonError httpbakery.Error
+ if err := json.NewDecoder(resp.Body).Decode(&jsonError); err != nil {
+ return errors.Annotate(err, "unmarshalling error")
+ }
+ return &jsonError
+}
@@ -0,0 +1,88 @@
+// Copyright 2016 Canonical Ltd.
+// Licensed under the AGPLv3, see LICENCE file for details.
+
+package authentication_test
+
+import (
+ "net/http"
+ "net/http/cookiejar"
+ "net/http/httptest"
+ "net/url"
+
+ "github.com/juju/juju/api/authentication"
+ "github.com/juju/testing"
+ jc "github.com/juju/testing/checkers"
+ gc "gopkg.in/check.v1"
+ "gopkg.in/macaroon-bakery.v1/httpbakery"
+)
+
+type VisitorSuite struct {
+ testing.IsolationSuite
+
+ jar *cookiejar.Jar
+ client *httpbakery.Client
+ server *httptest.Server
+ handler http.Handler
+}
+
+var _ = gc.Suite(&VisitorSuite{})
+
+func (s *VisitorSuite) SetUpTest(c *gc.C) {
+ s.IsolationSuite.SetUpTest(c)
+ var err error
+ s.jar, err = cookiejar.New(nil)
+ c.Assert(err, jc.ErrorIsNil)
+ s.client = httpbakery.NewClient()
+ s.client.Jar = s.jar
+ s.handler = http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {})
+ s.server = httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
+ s.handler.ServeHTTP(w, r)
+ }))
+ s.AddCleanup(func(c *gc.C) { s.server.Close() })
+}
+
+func (s *VisitorSuite) TestVisitWebPage(c *gc.C) {
+ v := authentication.NewVisitor("bob", func(username string) (string, error) {
+ c.Assert(username, gc.Equals, "bob")
+ return "hunter2", nil
+ })
+ var formUser, formPassword string
+ s.handler = http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
+ r.ParseForm()
+ formUser = r.Form.Get("user")
+ formPassword = r.Form.Get("password")
+ })
+ err := v.VisitWebPage(s.client, map[string]*url.URL{
+ "juju_userpass": mustParseURL(s.server.URL),
+ })
+ c.Assert(err, jc.ErrorIsNil)
+ c.Assert(formUser, gc.Equals, "bob")
+ c.Assert(formPassword, gc.Equals, "hunter2")
+}
+
+func (s *VisitorSuite) TestVisitWebPageMethodNotSupported(c *gc.C) {
+ v := authentication.NewVisitor("bob", nil)
+ err := v.VisitWebPage(s.client, map[string]*url.URL{})
+ c.Assert(err, gc.Equals, httpbakery.ErrMethodNotSupported)
+}
+
+func (s *VisitorSuite) TestVisitWebPageErrorResult(c *gc.C) {
+ v := authentication.NewVisitor("bob", func(username string) (string, error) {
+ return "hunter2", nil
+ })
+ s.handler = http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
+ http.Error(w, `{"Message":"bleh"}`, http.StatusInternalServerError)
+ })
+ err := v.VisitWebPage(s.client, map[string]*url.URL{
+ "juju_userpass": mustParseURL(s.server.URL),
+ })
+ c.Assert(err, gc.ErrorMatches, "bleh")
+}
+
+func mustParseURL(s string) *url.URL {
+ u, err := url.Parse(s)
+ if err != nil {
+ panic(err)
+ }
+ return u
+}
View
@@ -4,6 +4,7 @@
package api
import (
+ "net/url"
"time"
"github.com/juju/errors"
@@ -197,6 +198,10 @@ type Connection interface {
// ControllerAccess returns the access level of authorized user to the controller.
ControllerAccess() string
+ // CookieURL returns the URL that HTTP cookies for the API will be
+ // associated with.
+ CookieURL() *url.URL
+
// These methods expose a bunch of worker-specific facades, and basically
// just should not exist; but removing them is too noisy for a single CL.
// Client in particular is intimately coupled with State -- and the others
View
@@ -5,6 +5,7 @@ package api
import (
"net"
+ "net/url"
"strconv"
"github.com/juju/errors"
@@ -40,7 +41,7 @@ func (st *state) Login(tag names.Tag, password, nonce string, macaroons []macaro
Nonce: nonce,
Macaroons: macaroons,
}
- if tag == nil {
+ if password == "" {
// Add any macaroons from the cookie jar that might work for
// authenticating the login request.
request.Macaroons = append(request.Macaroons,
@@ -81,6 +82,13 @@ func (st *state) Login(tag names.Tag, password, nonce string, macaroons []macaro
MacaroonPath: "/",
},
}); err != nil {
+ cause := errors.Cause(err)
+ if httpbakery.IsInteractionError(cause) {
+ // Just inform the reason of the reason for the
+ // failure, e.g. because the username/password
+ // they presented was invalid.
+ err = cause.(*httpbakery.InteractionError).Reason
+ }
return errors.Trace(err)
}
// Add the macaroons that have been saved by HandleError to our login request.
@@ -188,6 +196,13 @@ func (st *state) ControllerAccess() string {
return st.controllerAccess
}
+// CookieURL returns the URL that HTTP cookies for the API will be
+// associated with.
+func (st *state) CookieURL() *url.URL {
+ copy := *st.cookieURL
+ return &copy
+}
+
// slideAddressToFront moves the address at the location (serverIndex, addrIndex) to be
// the first address of the first server.
func slideAddressToFront(servers [][]network.HostPort, serverIndex, addrIndex int) {
View
@@ -98,19 +98,6 @@ func (s *stateSuite) TestTags(c *gc.C) {
c.Check(controllerTag, gc.Equals, coretesting.ControllerTag)
}
-func (s *stateSuite) TestLoginMacaroon(c *gc.C) {
- apistate, tag, _ := s.OpenAPIWithoutLogin(c)
- defer apistate.Close()
- // Use a different API connection, because we can't get at UserManager without logging in.
- loggedInAPI := s.OpenControllerAPI(c)
- defer loggedInAPI.Close()
- mac, err := usermanager.NewClient(loggedInAPI).CreateLocalLoginMacaroon(tag.(names.UserTag))
- c.Assert(err, jc.ErrorIsNil)
- err = apistate.Login(tag, "", "", []macaroon.Slice{{mac}})
- c.Assert(err, jc.ErrorIsNil)
- c.Assert(apistate.AuthTag(), gc.Equals, tag)
-}
-
func (s *stateSuite) TestLoginSetsModelAccess(c *gc.C) {
// The default user has admin access.
c.Assert(s.APIState.ModelAccess(), gc.Equals, "admin")
@@ -156,18 +143,6 @@ func (s *stateSuite) TestLoginMacaroonInvalidId(c *gc.C) {
c.Assert(err, gc.ErrorMatches, "invalid entity name or password \\(unauthorized access\\)")
}
-func (s *stateSuite) TestLoginMacaroonInvalidUser(c *gc.C) {
- apistate, tag, _ := s.OpenAPIWithoutLogin(c)
- defer apistate.Close()
- // Use a different API connection, because we can't get at UserManager without logging in.
- loggedInAPI := s.OpenControllerAPI(c)
- defer loggedInAPI.Close()
- mac, err := usermanager.NewClient(loggedInAPI).CreateLocalLoginMacaroon(tag.(names.UserTag))
- c.Assert(err, jc.ErrorIsNil)
- err = apistate.Login(names.NewUserTag("bob@local"), "", "", []macaroon.Slice{{mac}})
- c.Assert(err, gc.ErrorMatches, "invalid entity name or password \\(unauthorized access\\)")
-}
-
func (s *stateSuite) TestLoginTracksFacadeVersions(c *gc.C) {
apistate, tag, password := s.OpenAPIWithoutLogin(c)
defer apistate.Close()
View
@@ -7,8 +7,6 @@ import (
"fmt"
"strings"
- "gopkg.in/macaroon.v1"
-
"github.com/juju/errors"
"github.com/juju/loggo"
"gopkg.in/juju/names.v2"
@@ -182,22 +180,3 @@ func (c *Client) SetPassword(username, password string) error {
}
return results.OneError()
}
-
-// CreateLocalLoginMacaroon creates a local login macaroon for the
-// authenticated user.
-func (c *Client) CreateLocalLoginMacaroon(tag names.UserTag) (*macaroon.Macaroon, error) {
- args := params.Entities{Entities: []params.Entity{{tag.String()}}}
- var results params.MacaroonResults
- if err := c.facade.FacadeCall("CreateLocalLoginMacaroon", args, &results); err != nil {
- return nil, errors.Trace(err)
- }
- if n := len(results.Results); n != 1 {
- logger.Errorf("expected 1 result, got %#v", results)
- return nil, errors.Errorf("expected 1 result, got %d", n)
- }
- result := results.Results[0]
- if result.Error != nil {
- return nil, errors.Trace(result.Error)
- }
- return result.Result, nil
-}
View
@@ -92,7 +92,7 @@ func (a *admin) login(req params.LoginRequest, loginVersion int) (params.LoginRe
controllerOnlyLogin := a.root.modelUUID == ""
controllerMachineLogin := false
- entity, lastConnection, err := doCheckCreds(a.root.state, req, isUser, a.srv.authCtxt)
+ entity, lastConnection, err := a.checkCreds(req, isUser)
if err != nil {
if err, ok := errors.Cause(err).(*common.DischargeRequiredError); ok {
loginResult := params.LoginResult{
@@ -241,8 +241,16 @@ func filterFacades(allowFacade func(name string) bool) []params.FacadeVersions {
return out
}
+func (a *admin) checkCreds(req params.LoginRequest, lookForModelUser bool) (state.Entity, *time.Time, error) {
+ return doCheckCreds(a.root.state, req, lookForModelUser, a.authenticator())
+}
+
func (a *admin) checkControllerMachineCreds(req params.LoginRequest) (state.Entity, error) {
- return checkControllerMachineCreds(a.srv.state, req, a.srv.authCtxt)
+ return checkControllerMachineCreds(a.srv.state, req, a.authenticator())
+}
+
+func (a *admin) authenticator() authentication.EntityAuthenticator {
+ return a.srv.authCtxt.authenticator(a.root.serverHost)
}
func (a *admin) maintenanceInProgress() bool {
Oops, something went wrong.

No commit comments for this range