@baptiste-from-paris that’s for you ^^
So the problem was that something (someone?) reloaded the portkey.ouroboros
namespace
nice !
you made it to Baltimore ?
still in Heathrow, boarding for Baltimore in 1 2 hour and a half
are you talking there ?
No, hosting an unsession on unrepl
lol
unsession of unrepl’s
(first time at a conf as a regular attendee)
lol
that’s nice too ! and talking about portkey
? too soon ?
yeah too soon, let’s target a proper talk next year 😄
I’d love to use om-next with portkey for a demo
what do you think about allowing resource directory instead of files
?
and adding all files in the directory (and subdirs?) as resources?
yes
main example would be assets file like css/js/html/img
ok except that you formulated your request as “allowing resource directory instead of files” and I’m ok for “allowing resource directory in addition to files”
yes, my mistake
ssl stuff is getting me crazy
Let’s train a braindump: • these are JDK classes so we don’t have control on the version
• public ifaces are mostly write-only • impl varies a lot
back to the loader problem or #’wrapper or something else ,
?
back to using clj-http in portkey
• these are JDK classes so we don't have control on the version
=> fix a jdk version for now
No.
ok ^^
as time pass the problem is going to get bigger
(and if the first thing you ask your user is to install a specific JDK....)
The root of the problem is clj-http.core/get-conn-mgr
.
yes indeed, and to be honest I am not confortable enough with portkey to realize how big the problem is
as an optimization default values are allocated when the clj-http.conn
is loaded
and these values depends on JDK version, security/crypto settings and moon phase
especially moon phase
that’s what I was going to say, I remember having to turn off SSL with Google client api and portkey
because of (java.security KeyStore)
The Java one?
yes, let me find you pieces of code
this code works fine localy =>
(defn gmail-service [app-name account-id file-path account-user]
(let [transport (.. (NetHttpTransport$Builder.)
(trustCertificates (GoogleUtils/getCertificateTrustStore))
(build))
jackson (JacksonFactory/getDefaultInstance)
credentials (.. (GoogleCredential$Builder.)
(setTransport transport)
(setJsonFactory jackson)
(setServiceAccountId account-id)
(setServiceAccountPrivateKeyFromP12File (File. file-path))
(setServiceAccountScopes (GmailScopes/all))
(setServiceAccountUser account-user)
(build))]
#_(.refreshToken credentials)
(.. (Gmail$Builder. transport jackson credentials)
(setApplicationName app-name)
(build))))
it let’s you create a gmail-service with a g-suite accounte (pro) and do pretty-much what ever you want with your g-suite account
but it does not work on portkey
because of this line
(trustCertificates (GoogleUtils/getCertificateTrustStore))
Clojure is 10yo, don’t use ..
anymore
lol
i’am addicted to CLJ for a year ^^
and this getCertificateTrustStore
does this =>
public static synchronized KeyStore getCertificateTrustStore()
throws IOException, GeneralSecurityException {
if (certTrustStore == null) {
certTrustStore = SecurityUtils.getJavaKeyStore();
InputStream keyStoreStream = GoogleUtils.class.getResourceAsStream("google.jks");
SecurityUtils.loadKeyStore(certTrustStore, keyStoreStream, "notasecret");
}
return certTrustStore;
}
It’s an opinion but ->
allows to mix fns and methods, and force you to prefix methods by .
making it more locally obvious it’s interop
ok, thx. will try this way then
and loadKeyStore
fails
because SecurityUtils.getJavaKeyStore();
returns null
I have to trie it again but I think that java.security.getInstance
was failing
I’ll check tomorrow morning what this one returns = clj-http.conn-mgr/get-keystore
I don’t know if It helps or not