Fork me on GitHub
#biff
<
2022-07-16
>
Jacob O'Bryant00:07:06

To make it easier to not accidentally expose secrets while pair programming, I just pushed https://github.com/jacobobryant/platypub/commit/ca752172a26fc52c514839edc7df97ae734fcfd8 to make Platypub read secrets from a new secrets.edn file. It's backwards compatible, so it'll still work if you leave secrets in config.edn, but now there is the option of putting them in a separate file. To do so, copy the new secrets.edn.TEMPLATE file to secrets.edn, and then check that file to see which keys should be moved from config.edn. To access secrets, now you do e.g. (util/get-secret sys :mailgun/api-key) instead of (:mailgun/api-key sys) If you have :biff.middleware/cookie-secret and :biff/jwt-secret set, those still need to be in config.edn. I'll need to make an update to Biff before those can be moved to secrets.edn . However I'm guessing most people/everyone except me doesn't have those keys set, in which case Biff generates a new pair whenever you start the application. (See https://github.com/jacobobryant/platypub/issues/34)

jeffparker20:07:30

Thanks, I moved my secrets and removed them from config.edn It's working fine, sweet! No truly confidential attributes while browsing the system map.

🎅 1
Soe H09:07:41

I wish there are more simpler tutorial about biff, kind of like flasrk for python flask

Jacob O'Bryant17:07:51

Sure, could you give me a link to the flasrk tutorial? I did a quick search but didn't see anything immediately

Soe H16:07:54

https://flask.palletsprojects.com/en/2.1.x/tutorial/. Well, actually anything from scratch, that a beginner can follow.

Jacob O'Bryant16:07:49

👍 I've actually been thinking about adding a tutorial like that for building a chat + forum application, so that might happen soon(ish). in the mean time it looks like the Biff docs (https://biffweb.com/docs/) cover much of the same kind of material? except they're reference docs, not a tutorial, so possibly not as easy for getting your feet wet

macrobartfast00:07:00

@U03PB0E914Y How is your development setup? Do you need to get things set up with an editor or anything? Sometimes that can be a bit of a hurdle.

Soe H08:07:58

Sorry for delayed reply, @U0X9N9ZK5 I'm using idea + cursive, I do have problem related to dev setup. How do I refer to xtdb node (db) from the repl?

Jacob O'Bryant15:07:08

if you're in a biff project, there's a repl.clj file which contains a get-sys function. that returns a map with a :biff/db key.

thanks3 1