go to post Dmitry Maslennikov · May 17, 2021 Fragmentations issues, with SSD disks not an issue anymore. But in any way, I agree with storing files in the database. I have a system in production, where we have about 100TB of data, while more than half is just for files, stored in the database. Some of our .dat files by mapping used exclusively for streams, and we take care of them, periodically by cutting them at some point, to continue with an empty database. Mirroring, helps us do not to worry too much about backups. But If would have to store such amount of files as files on the filesystem, we would lose our mind, caring about backups and integrity.
go to post Dmitry Maslennikov · May 17, 2021 LuhnMCheckSum(input) public { Set input = $Piece(input, "#", 1) Set codePoints = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789/:" Set n = $Length(codePoints) Set sum = 0 Set factor = 2 Set len = $Length(input) For i = len:-1:1 { Set codePoint = $Find(codePoints, $Extract(input, i)) - 2 Set addend = factor * codePoint Set factor = $Case(factor, 2: 1, : 2) Set addend = (addend \ n) + (addend # n) Set sum = sum + addend } Set remainder = sum # n Set checkCodePoint = (n - remainder) # n Return $Extract(codePoints, checkCodePoint + 1) } LuhnMValidate(input) public { Set checksum = $Piece(input, "#", 2) Set input = $Piece(input, "#") Return $$LuhnMCheckSum(input) = checksum }
go to post Dmitry Maslennikov · May 14, 2021 Is this, what are you looking for?https://rosettacode.org/wiki/Luhn_test_of_credit_card_numbers#MUMPS
go to post Dmitry Maslennikov · May 14, 2021 In most cases, it’s enough to just create empty certificate with just default values. how do you use it?
go to post Dmitry Maslennikov · May 14, 2021 what will show the output of locale command in OS? So, your filesystem may not accept Unicode. And you would need to convert Unicode to a more suitable codepage.
go to post Dmitry Maslennikov · May 13, 2021 So, you just need help in find the place in the class which cause an error? I would suggest to try removing each class member one by one, until you’ll narrow it to one member, and maybe you’ll realize why it’s happening.
go to post Dmitry Maslennikov · May 12, 2021 Well, just noticed the version you have, any chance to upgrade such an old version to at least 2016.2
go to post Dmitry Maslennikov · May 12, 2021 I would not recommend using such undocumented functions like this. Instead, of this you can switch to something else. Like $system.OBJ.ExportUDL, or some other internal methods ##class(%Atelier.v2.Utils.TextServices).GetTextAsArray() ##class(%Compiler.UDL.TextServices).GetTextAsArray()
go to post Dmitry Maslennikov · May 11, 2021 Yeah, sure, it's quite simple to do. JWT tokens contain three parts separated by a pointer sign. Header, with the algorithm of the signature and the type of token Payload, any data in JSON format Signature needs to verify the token All of those parts are encoded with Base64 Set token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" #; Extract parts of the token Set $ListBuild(header, payload, sign) = $ListFromString(token, ".") #; Decode and parse Header Set header = $System.Encryption.Base64Decode(header) Set header = {}.%FromJSON(header) Write !,"header" Write !,"alg = ",header.alg Write !,"typ = ",header.typ #; Decode and parse Payload Set payload = $System.Encryption.Base64Decode(payload) Set payload = {}.%FromJSON(payload) Write !!,"data" Write !,"name = ", payload.name Write !,"iat = ", payload.iat
go to post Dmitry Maslennikov · May 10, 2021 As I said, you have to get it from your client, It's no publicly available anymore.
go to post Dmitry Maslennikov · May 10, 2021 Most of the code related to OAuth2 in IRIS, supposed that you have configured OAuth2 Client, and uses this information to validate and extract data from the token. And this particular method will expect OAuth2 client with the name "demoresource". I'm not sure how InterSystems supposed to get it worked together with IAM. But I have an example, of extracting data from the JWT token, without any configuration. Look at this code. In this class, I can generate tokens and validate them, as well as pass any data to generating tokens, and extract it. But it also uses a secret phrase to validate the token. And depends on the algorithm, it will require just a simple string as a secret phrase, or a public and private key. And try the suggested JWT debugger, which may help you in understanding, what's exactly stored in the token and used algorithm for the key.
go to post Dmitry Maslennikov · May 10, 2021 The guide is here . But in this case, you will need to get Caché distributive from your client.
go to post Dmitry Maslennikov · May 10, 2021 If you are new to InterSystems, you should start with IRIS, which is the newest product, the replacement for Caché. You can download the distributive here or through WRC if you already have access. The installation process on Windows is quite simple, just run the installer, and press the buttons Next. It will be enough for the evaluation. You may look at the documentation, for the Installation guide.
go to post Dmitry Maslennikov · May 10, 2021 Management Portal is a part of the default installation. And in windows, should be available from the menu by the InterSystems Cube icon in the tray. And usually, the URL is something like this. The port can be different if you have more than one instance of Cache installed. http://localhost:57772/csp/sys/UtilHome.csp
go to post Dmitry Maslennikov · May 10, 2021 Do you mean the OAuth2 token? If so, did you use the native OAuth2 support in Caché/IRIS? This JWT Debugger may help to understand what's inside the token stored.
go to post Dmitry Maslennikov · May 9, 2021 2917.1 the image is daimor/intersystems-cache:2017.1 and Dockerfile https://github.com/daimor/docker-intersystems/blob/2017.1/Dockerfile there are images for any version from 2014.1 to 2018.1
go to post Dmitry Maslennikov · May 9, 2021 Could you check with the image daimor/intersystems-cache:2017.2 ? Dockerfile is available here
go to post Dmitry Maslennikov · May 7, 2021 ObjectScript does not have such thing as an Interface. The only way to get something like this is to use Abstract class, with methods that throw an error, while not overridden.
go to post Dmitry Maslennikov · May 3, 2021 On the Login page, it does not show IRIS Logo. IRIS just returns 404 for the icon, if it's present, after the first login, it appears in WebGateway cache and became available. And the same for any static files. The Security Audit shows this error. <PROTECT>%Oid+3^%Stream.Object.1 ^IRIS.SM.Shard,/usr/irissys/mgr/