go to post Dmitry Maslennikov · Nov 30, 2020 Linux Mint is Debian based distributive, and it should be possible to run Caché there. And you can also use Docker
go to post Dmitry Maslennikov · Nov 27, 2020 For any new project based on IRIS, I would recommend, to have all the application logic outside of InterSystems IRIS, and use it only as a database. For instance with NodeJS Native API.
go to post Dmitry Maslennikov · Nov 26, 2020 But the issue may be in Raspbian, which I suppose is 32 bit, while 64 bit yet in beta. And you have to install 64 bit version of Raspbian or Ubuntu 20.04 64 bit
go to post Dmitry Maslennikov · Nov 24, 2020 set dd = $system.SQL.TOTIMESTAMP(20201121090000, "YYYYMMDDHHMISS") Most of the SQL functions available with $SYSTEM.SQL
go to post Dmitry Maslennikov · Nov 24, 2020 Official online documentation for IRIS, available only online or offline as PDF only. Class Reference Documatic, working only when the server is up and running. No static HTML documentation at all.
go to post Dmitry Maslennikov · Nov 23, 2020 You have to use HTTPS, for such tasks, encryption passwords on the client-side not secure in any way. The only way to make it secure is by using SSL. Base64 is far from Security, anybody with such a string can get a real password. With SSL, it will be impossible to decrypt any traffic between client and server. So, even way, to catch anything about a password.
go to post Dmitry Maslennikov · Nov 19, 2020 Well, I have not used Admin SDK in google, yet. And it was the first time, for me. But I've managed to get JWT and AccessToken, and was able to make requests. Unfortunately, configuration on the IRIS side is very tricky. OAuth2 Client server should be filled manually Issuer endpoint: https://oauth2.googleapis.com/token This issuer is important SSL configuration: created manually, only fill the name And two required endpoints https://accounts.google.com/o/oauth2/v2/auth https://oauth2.googleapis.com/token I did not use JSON file with private key here. But I've used it for X509 I did not manage to get it worked without configured X509. URL from `client_x509_cert_url` field in JSON provided by Google, opened it in browser, It contains three certificates in JSON. Took the latest one. Saved in file, replaced \n with end lines. and `private_key` from file, saved as google.key. When press save, it compares certificate and private key if the match, it will be saved. Back to OAuth2, create client configurations. First of all, go to JWT settings, fill just created X509. And Request Algorithms. On the Client Credentials, tab fill Client ID with value of `client_email` from JSON. Back to General, tab, fill Application name, SSL configuration. Client Type as Resource server, ( by unknown reasons will hide Request algorithms group of fields on JWT tab). And that's it. Code to create JWT Set p("scope") = "https://www.googleapis.com/auth/admin.directory.user" Set p("exp") = ##class(%OAuth2.Utils).TimeInSeconds($ZTimestamp, 3600) Set p("iat") = ##class(%OAuth2.Utils).TimeInSeconds($ZTimestamp) Set jwt = ##class(%SYS.OAuth2.Request).MakeRequestJWT("google", .p, .tSC) If $$$ISERR(tSC) { Do $System.OBJ.DisplayError(tSC) Quit } Write !,"JWT:",!,jwt It Should be quite long, and have three groups, separated by dots, if it ends with a dot, means it did not find how to sign it. Check the settings. And request access token Set hs = ##class(%Net.HttpRequest).%New() Do hs.InsertFormData("grant_type", "urn:ietf:params:oauth:grant-type:jwt-bearer") Do hs.InsertFormData("assertion", jwt) Set hs.Https = 1 Set hs.SSLConfiguration = "google" Set tSC = hs.Post("https://oauth2.googleapis.com/token") If $$$ISERR(tSC) { Do $System.OBJ.DisplayError(tSC) Quit } Set response = {}.%FromJSON(hs.HttpResponse.Data) Set accessToken = response."access_token" Write !!,"AccessToken:",!,accessToken And finally you can use that access token in the header Authorization, with prefix Bearer Set hs = ##class(%Net.HttpRequest).%New() Do hs.SetHeader("Authorization", "Bearer " _ accessToken) Set hs.Https = 1 Set hs.SSLConfiguration = "google" Set tSC = hs.Post("https://www.googleapis.com/admin/directory/v1/users") If $$$ISERR(tSC) { Do $System.OBJ.DisplayError(tSC) Quit } Set response = {}.%FromJSON(hs.HttpResponse.Data)
go to post Dmitry Maslennikov · Nov 13, 2020 To load such XML files, you have to use $system.OBJ.Load("/path/to/some.xml", "ck", .errors) - Just one file $system.OBJ.LoadStream(stream, "ck", .errors) - Load from stream $system.OBJ.LoadDir("/path/to/sources", "ck", .errors, 1) - Load any source code files, recursively $system.OBJ.ImportDir("/path/to/sources", "*.xml", "ck", .errors, 1) - Load any source code files by specified filter, recursively
go to post Dmitry Maslennikov · Nov 13, 2020 This may happen if you have not opened just created workspace. You have to open any folder or workspace file.
go to post Dmitry Maslennikov · Nov 6, 2020 You can download these versions. Community Edition just has a few limitations, but still can be used. And look at the installation guides
go to post Dmitry Maslennikov · Oct 31, 2020 Extracting such amount of data with using JDBC/ODBC, will be much slower than any sort of native access in Cache. InterSystems Cache offers a way to export the whole table, with selected columns Open System Management Portal, System Explorer, SQL. Switch to the desired namespace. Click on Wizards and select Data Export The next steps should be pretty much simple, just select what you need to export and starts in the background. So, you will be able to control how it is going. Look at the documentation for more details
go to post Dmitry Maslennikov · Oct 30, 2020 Extract data could be quite tricky depending on how old is application there. If you sure that the desired data is available through SQL, so you can use any SQL tools, DataGrip, DBeaver, Squirrel-SQL. DBeaver already supports Cache out of the box, and very soon will support IRIS as well.
go to post Dmitry Maslennikov · Oct 6, 2020 There is only one way to do it, is to use any supported webserver, Apache or Nginx, and do not use built-in apache. Configure the chosen server to work with InterSystems products. And configure SSL for that server, in any way by instructions you can find on the internet.
go to post Dmitry Maslennikov · Oct 4, 2020 You can use property "links" in "objectscript.conn", to add some links to your projects, which you will be able to open quickly "objectscript.conn": { "active": true, "username": "_system", "password": "SYS", "ns": "MYAPP", "port": 52773, "links": { "MyApp": "http://${host}:${port}/csp/${namespace}/main.csp" } } After this, you will get a new item in the menu shown by click on the status bar with connection info.
go to post Dmitry Maslennikov · Sep 25, 2020 Look here. You can implement snippets in the project, and store it in source control close to your sources.
go to post Dmitry Maslennikov · Sep 25, 2020 By code sections, I would get some code snippets. In VSCode, you can easily add any amount of snippets, look at this article. And VSCode will offer to insert code snippet, while you typing text written in prefix of the snippet.
go to post Dmitry Maslennikov · Sep 22, 2020 To be able to export %Id() as id property in JSON, I had to add this. Property id As %Integer [ Calculated, SqlComputeCode = { Set {*} = {%%ID} }, SqlComputed ]; I think, that it would be better to have some parameter in a class which would enable to output id easier without hacks.
go to post Dmitry Maslennikov · Sep 19, 2020 Yeah, at the moment it does not support a real quiet way, and at the moment, it's just not verbose logging. Verbose produces even more logs. So, I would recommend, just fill the issue in the repo.