It seems part of the problem was that I was accessing the server only from 
localhost which by default gives all permissions.  I spun up a docker 
container and accessed from outside and authorization worked.  The 
'personal' folder gave no ability to upload without a login.  The wiki 
lives in 'work' directory and I added a datafolder section to the settings 
file to make that read only.  

It's possible the username and password pairs are not needed in the data 
folder I'm still playing around.  Notice that I added a 'transfer: true' in 
the authAccounts - permissions values.  This is not shown in the example in 
the TiddlyServer docs.

If anyone has suggestions about how to make authorization specific to a 
directory I would appreciate it.  The 'tree' section in the Tiddlyserver 
makes no sense to me when it gets to the options section and breaks out 
into an xml example.

Here is the settings.json I ended up with:

{

  "tree": {
    "tiddlywiki": "../work",
    "personal": "../personal"
  },


  "authAccounts": {
    "mainuser": {
      "clientKeys": {
        "username": { "publicKey": "base64-copied-from-terminal", 
"cookieSalt": "salt" }
      },
      "permissions": {
        "mkdir": true,
        "putsaver": true,
        "registerNotice": true,
        "upload": true,
        "websockets": true,
        "writeErrors": true,
        "loginlink": true,
        "transfer": true
      }
    }
  },

  "bindInfo": {
    "bindAddress": ["0.0.0.0"],
    "localAddressPermissions": {
      "*": {
        "putsaver": false,
        "writeErrors": false,
        "upload": false,
        "mkdir": false,
        "websockets": false,
        "registerNotice": true,
        "loginlink":true
        }
    }
  },

  "datafolder": {
    "readers": "(anon)",
    "username": "joe",
    "password": "password"
  },

  "$schema": "./settings-2-1.schema.json"
}




-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/9d331d8e-a270-45f2-98ff-e8ee7db16b9e%40googlegroups.com.

Reply via email to