Commit Graph

63 Commits

Author SHA1 Message Date
Brad Fitzpatrick f3f0030b25 serverconfig: error on bad baseURL values.
Fixes https://code.google.com/p/camlistore/issues/detail?id=195

Change-Id: I74e194a3903cd7ae36319bc98659e436e9b142d4
2013-08-08 17:50:50 -07:00
Brad Fitzpatrick 0bdf20884b all: delete pkg/blobref; convert all from *blobref.BlobRef to new blob.Ref
Change-Id: Id2dfb7f19452bedf4f3c9310b36227fd8117b225
2013-08-03 19:54:30 -07:00
mpl 759be70c92 share: allow configuration of URL prefix
http://camlistore.org/issue/160

Change-Id: I77998bbde21790f15a5c4b492307434290ef9421
2013-07-17 16:06:15 +02:00
Michael Zuffoletti c2669a6dfc issue 23: Fix google storage blobserver as sync dest
Change-Id: I33d88dc5028ebb76d4c17d2a00d8f8346114f876
2013-07-08 11:33:10 -05:00
Brad Fitzpatrick f1728b3299 serverconfig: use handlers package consistently for all handlers now.
Change-Id: Ib10e887e8692d99a838547016d044394cb8db3a7
2013-07-08 19:56:52 +10:00
Brad Fitzpatrick 9468e5ba70 More docs. Every package is documented now.
misc.CountingReader moves into readerutil.

pkg/atomics is folded into pkg/types.

pkg/test/testdep is folded into pkg/test, with better name/docs.

Old cruft from pkg/webserver is deleted.

Change-Id: I3f72d8b29804254ef944995fb085837c878f79f5
2013-07-07 21:12:30 -07:00
Brad Fitzpatrick 62ad21ff2e Docs and minor cleanups
Change-Id: Ibf1d69c21f53cf4b5b576a0dfefa5d0e7b26264d
2013-07-07 16:09:17 -07:00
mpl 633b8df2a7 publish: find ui and closure resources similarly to ui handler
Fixes publishing of pics.

Change-Id: I5fe305ee8c7e4c4d80e53b8efea462980636dbf2
2013-06-29 00:54:59 +02:00
Brad Fitzpatrick ffad34ef94 Add ownerName to config.
Change-Id: I81e39e21f9c76df45fd2bd6f4f6fab02ab28ddbf
2013-06-26 12:55:47 -07:00
mpl c2379dcf07 genconfig: added sourceRoot parameter
Change-Id: I321279c0625ef24d52f62ec718f4a667f735f032
2013-06-20 23:33:00 +02:00
mpl 62cb54b28f serverconfig: fix tests broken by status handler addition
Change-Id: I2dbf2f56e87d2f5043dd6299e151faa71631fb46
2013-06-10 01:21:23 +02:00
mpl 7059a616c0 show server status on index page
We're only showing build version for now.
Next step would be status handler.

See http://camlistore.org/issue/111

Change-Id: I9e0792abe9ffed8139d38478d186b6e75f99de7e
2013-06-09 18:46:24 +02:00
mpl 90f8e3686d serverconfig: fix test
reflects newui changes to published gallery

Change-Id: I6f989c205f5e17442615b4b131d4dfb2a96d376d
2013-06-05 15:07:53 +02:00
mpl 11a3f78691 WIP: switch from ui to newui
This CL proposes 4 changes:

1) When making the embeds, any .html files in newui is rewwritten
on the fly so that the resulting embed uses all.js instead of
individual .js files. all.js is the only javascript file embedded
for newui.

2) Various bugs and paths in the newui/*.js files were fixed so that
everything works when using all.js

3) pkg/server/ui.go was modified so that all features from ui should
now have an equivalent in newui, that is served through ui/new/.
In a next step, we can move back everything from newui/ into ui/ and
completely get rid of the old ui.

4) The published gallery now uses closure too.
In another next step, we should probably work on serving its static
part directly from an .html file or (include it in the zembed somehow?)
instead of generating it at every request. Or at least cache it?

This commit includes the zembeds in newui, except for zembed_all.js.go
since it is large and it would take a lot of space in the git history
everytime we change it.
The plan is to roll-sum it into chunks to address that problem.

Change-Id: I381d8ddf3a2bbe37e3c4b1c4bf423f16beffaaf4
2013-06-04 16:34:51 +02:00
mpl ac431439f3 Allow HTTPS with a self-signed certificate.
A new client configuration parameter, "trustedCerts" (list of strings)
is introduced. A certificate fingerprint is defined as the 10 digits
prefix of the sha1 of the whole certificate (in ASN1. DER form).
trustedCerts should contain the list of fingerprints of the
certificates we trust. If not empty, the server's certificate
is checked against that list, instead of using the full x509 validation
on it.

-added a dial function and tls configuration, which check if we're using
SSL, and if we're in "trustedCerts" mode.
pkg/client/client.go
pkg/client/config.go

-moved android specific hacks from camput to the client layer, so that
the dial and tls config could reuse/access them. Also allows future
reuse for other commands, such as camget.
pkg/client/android.go

-adapted camput to the above changes:
cmd/camput/android.go
cmd/camput/camput.go
cmd/camput/files.go

-server prints a hint when it generates the self-signed:
pkg/misc/misc.go
server/camlistored/camlistored.go

-camliactivity:
clients/android/res/xml/preferences.xml
clients/android/src/org/camlistore/Preferences.java
clients/android/src/org/camlistore/SettingsActivity.java
clients/android/src/org/camlistore/UploadService.java
clients/android/src/org/camlistore/UploadThread.java

http://camlistore.org/issue/131

Change-Id: I6be20161549a69aafc8eb7b9e96e9351dc1c5b09
2013-04-23 17:10:37 +02:00
mpl f21cea5131 share: refactored
-pkg/server/share.go handles share(d) blobs.
-pkg/blobserver/gethandler no longer deals with share blobs
and has been rewritten like the other handlers (no more auth
in there).
-client and signhandler changed accordingly.
-serverconfig: auth moved up in makeCamliHandler
-share parameter added to the user level and low level config.
-share URL is now http(s)://host[:port]/[prefix/]share/sha1-xxxx.

Addresses http://camlistore.org/issue/107

Change-Id: I0a2c07ac1a1e435b141702e0ff06dc8182721d65
2013-03-06 19:11:00 +01:00
mpl 7e448fe05e serverconfig: remove TODOs about FindHandlerByType since its behaviour now complies with the docs
Change-Id: I7ca754c0a27aa0ffc1bc1b4fe034a1c17f1876ef
2013-01-17 16:54:07 +01:00
mpl 306c6f9c19 blobserver: drop support for PUT as it was replaced with a POST upload action for uploading
Change-Id: Iffaea22064f057b93c33268546470d71efb02274
2013-01-17 16:05:11 +01:00
Brad Fitzpatrick 88e92a6cc5 Document blobserver.Loader methods, fix GetHandlerType to not force-load, diagnose loops better.
Change-Id: I03e989267e80ad610d3877c97fbf8adc8a88bb60
2013-01-11 12:42:30 -08:00
Brad Fitzpatrick 4be9f2f264 serverconfig: fix test on OS X
Change-Id: Ic5a8f820abe3cad920a18991cc21b5386fdf9553
2013-01-11 10:52:22 -08:00
Brad Fitzpatrick d80cad8e2d auth stuff: clean up, allow scheme registration, integrate App Engine auth.
Change-Id: Idc7ac3782d3669a8f68255bd54d03f583814d5e2
2013-01-10 23:04:24 -08:00
Brad Fitzpatrick 6ca0efac8c camlistored: much better sqlite support, by default, and help/docs/hints 2013-01-10 16:16:10 -08:00
Brad Fitzpatrick 642613ebfc serverconfig: sqlite support and general cleanups. 2013-01-10 15:29:08 -08:00
mpl 03ca023b03 serverconfig: make the localdisk optional, so that
s3 can be used as the primary blobserver.

Fixes http://code.google.com/p/camlistore/issues/detail?id=81

Change-Id: I12a7eb9a3dafc885eaaf14ba8da8716a6440416a
2013-01-10 23:14:56 +01:00
mpl 12213c058e Changed auth to take into account not only the credentials,
but the requested operation/action too.

This allows to restrict vivify credentials to only upload
(as well as get and stat, because they're needed) to the
blobserver.

Change-Id: Idaed60d1f0d679cb9795ba9a11f094f964774335
2013-01-04 22:17:12 +01:00
mpl ed20da7592 vivify: support in camput and upload handler.
no special credentials/auth yet.
pkg/blobserver/handlers/get.go moved to
pkg/blobserver/gethandler/get.go to avoid
a dependency loop with the json sign helper.
pkg/server/sig.go was moved to pkg/jsonsign/signhandler
because it seemed inapproriate to import in
pkg/blobserver/handlers/upload.go something from
pkg/server

Change-Id: Ifeb14512e182e8a101d4fced6d6d4184e2b9cb99
2012-12-30 23:39:22 +01:00
Brad Fitzpatrick d0af61a04a Fix bugs in enumerate handler and s3's MaxEnumerateConfig.
Change-Id: Ib9cd52fe7d015a8c70416ec67ff6fd99a7a03d24
2012-12-22 13:50:55 -08:00
Brad Fitzpatrick 5aefa82fab genconfig: s3 config support
Change-Id: I6681d8dffee01ac4a50118377b4172fd2f331049
2012-12-21 16:13:36 -08:00
Brad Fitzpatrick ff960933e6 serverconfig: minor cleanup
Change-Id: I6e25c4392303200c3bbe33b3d32239491436cbb0
2012-12-21 15:47:08 -08:00
mpl fd274ecbb1 fix serverconfig tests,
broken because of discovery move from ui to root

Change-Id: I3e2e5c9280f9ea691d9143aa2bc0a971a6dce325
2012-11-12 23:04:55 +01:00
mpl 40bd73ee07 move discovery from /ui/ to / in genconfig too
Change-Id: I1a020696e64c58f911e85070263c015bdbd2be1c
2012-11-08 15:27:17 +01:00
Brad Fitzpatrick a41269e78e Reindex all dev-server blobs into memindex on restart.
Required some sync work (full syncs on start, blocking full syncs on
start, and also adding a dev-only hack to force a depedency from
search -> sync, to control the handler initialization order, otherwise
publish handlers would race with the sync handler and they'd create
new "blog" and "pics" permanodes and we'd end up with duplicates).
2012-11-07 22:40:17 +01:00
Brad Fitzpatrick bccf8ed575 Move discovery up from the UI handler to the Root handler. 2012-11-07 18:57:43 +01:00
Brad Fitzpatrick 39d8df7bb2 serverconfig: docs and unexport GenLowLevelConfig 2012-11-07 17:51:42 +01:00
mpl 295cbade1b Add postgres support
Also added the -short option for make presubmit
because postgres test is too slow.

Change-Id: I6be21c4d4cd67671eb44ab65333fc32c1e261bbd
2012-11-03 19:59:22 +01:00
mpl 8138cf8fd6 mongo: added user:pass style authentication
The mongo indexer didn't have any authentication
scheme, so this change adds the user:pass@host
authentication.
The mongo indexer tests now use the root:root
credentials.

Change-Id: I7867f46e3b5f0a4a1a50f86f26d76c0bfd69e9ac
2012-10-25 00:35:19 +02:00
Brad Fitzpatrick 0645035db7 Make serverconfig tests pass again.
Change-Id: I83077f7573a81b643639c78de1a72169e82b09e9
2012-10-20 12:33:39 -07:00
Brad Fitzpatrick d0faee5726 Compile with Go tip.
Change-Id: I518c357613049e80939ccab9c30b6aaf03ebe140
2012-10-20 12:27:50 -07:00
Brad Fitzpatrick 7fba04d71a Compile with Go tip again.
See https://groups.google.com/forum/?fromgroups=#!topic/golang-dev/yULJVYAbIzg

Change-Id: I11e8dd99a9ec4a065f03b888b616c13e5ce0e92c
2012-10-19 12:51:10 -07:00
mpl 94cb8cf05a Be consistent between high and low level configs for https
Change-Id: Ie7e1d9c554e09a34416a2ae3ac9e10f1a2f8fce0
2012-10-18 11:58:30 +02:00
mpl 844551d0b2 If baseURL was not user defined, this change makes sure it is
dynamically defined from incoming requests.
The listen flag has moved from pkg/webserver to server/camlistored
and is not using runsit anymore.
httputil.ServerError now only outputs the full error if we're
in internal/debug mode.
http://code.google.com/p/camlistore/issues/detail?id=53

Change-Id: I55a1c6d43a549d9ee2022742a83aa142dc19e02a
2012-10-15 16:26:50 +02:00
Brad Fitzpatrick 11842fcf33 serverconfig: let baseURL and listen be optionally separate 2012-08-04 21:42:10 +10:00
Brad Fitzpatrick 42833a76e0 serverconfig: be consistent between low- and high-level config
Use TLSCertFile and TLSKeyFile in both.
2012-08-04 21:11:52 +10:00
Brad Fitzpatrick 493f75a72e serverconfig: allow configuring TLS cert/key 2012-08-04 11:12:39 +10:00
mpl 71ab8c787b quickfix for "race" between root handler and ui handler creations
Change-Id: Id92cf57442ef8c2a503fde7522ff7824efbfb9e9
2012-07-12 01:29:54 +02:00
Brad Fitzpatrick 50fe7a2fda Make UI discovery have absolute paths, so root discovery using UI's discovery handler works.
Change-Id: Ieb1b5d143c528b4b15875aa810038c3ebdf30251
2012-05-13 13:02:20 -07:00
Brad Fitzpatrick 0df3e3c689 Merge branch 'master' of ssh://camlistore.org:29418/camlistore 2012-05-13 10:52:50 -07:00
Brad Fitzpatrick d29cbb5e35 rename FindHandlerByTypeIfLoaded to be shorter. document better.
Change-Id: I20b1a191d2d67972ba1f7a7fd3678d4ab4adae55
2012-05-14 03:48:51 +10:00
Brad Fitzpatrick 0f90f864f6 Add some serverconfig docs
Change-Id: Ibecb0cc21c2273a97956892ed6a37a0f53fd43a2
2012-05-14 01:51:39 +10:00
Brad Fitzpatrick 5f5da19d45 rename a function
Change-Id: I328ed897f55a0bfcc5b4c806aac18966edb1c990
2012-05-14 01:46:39 +10:00