Article David Hockenbroch · Dec 4 6m read Sub-Table Security InterSystems IRIS provides extensive configurable security options, yet many developers primarily use roles and resources to secure entire tables or routines. Today, we will delve deeper. We can also secure individual columns and rows separately, but these two mechanisms operate very differently. Let's begin with the columns. Column Security For testing and demonstration, we will keep our table structure concise and straightforward. We have a table called "Person" in the USER namespace that contains an ID column, a date of birth column (DOB), first name, and last name. #Access control #Management Portal #ObjectScript #Security #SQL #System Administration #InterSystems IRIS 2 0 0 19
Article David Hockenbroch · Nov 24 4m read Bringing Legacy Code Into Current Versions - Tips and Tricks Inevitably, you will eventually need to move your code up from one version of IRIS or Cache to a more recent version of IRIS. There are a few good steps you can take to set yourself up for success in that process. #Compatibility #Tips & Tricks #InterSystems IRIS 3 0 0 61
Article David Hockenbroch · Nov 3 8m read JWT Authentication When I was younger (a question about exactly how much younger is outside the scope of this article), the word “token” meant fun. You see, just a couple of times a year, I would get to go to an arcade and play some amusing video games with my friends. #Access control #API #Authentication #JSON #ObjectScript #InterSystems IRIS 12 1 8 148
Article David Hockenbroch · Jul 10 16m read The Zen Angle Dear community, I have a confession to make. I have not gotten over Zen yet. Alas, all good things must come to an EOF, so I am currently learning about Angular. I am working on proving to myself that with the right back end and Angular components, I can deliver to myself and my team a very Zen-like experience in this environment. #Angular2 #API #Code Snippet #Frontend #JSON #ObjectScript #REST API #ZEN #InterSystems IRIS 8 7 1 228
Article David Hockenbroch · Apr 22 7m read Set, Get, and Don't Fret with JSON The Good Old Days The %Library.DynamicObject class has been in IRIS since before it became IRIS. If you have been using it since the Cache days, you may want to brush up on some of its changes. In Cache 2018, the %Get method only had one argument. It was the key to retrieving from the JSON, meaning that if your JSON object called myObj, it would look like the following: #Beginner #Coding Guidelines #Error Handling #JSON #ObjectScript #Tips & Tricks #InterSystems IRIS 8 3 3 282
Question David Hockenbroch · Jan 8 Can't edit %Net.SMTP despite having %DB_IRISSYS and database mounted as RW? I need to see the full SMTP trace when a %Net.SMTP attempts to send an email to troubleshoot an issue. As far as I know, the only way to get that is to uncomment line 192 in the %Net.SMTP class. //:#define SMTPTRACE I've done this in the past by giving myself the %DB_IRISSYS role, so I tried that. That database is also not mounted as read-only. #Databases #Debugging #InterSystems IRIS 0 7 0 144
Question David Hockenbroch · Nov 8, 2024 Debugging %Net.SMTP Requests I'm having an issue with sending SMTP requests from a specific Microsoft 365 account to Gmail accounts. We can use other Microsoft 365 accounts, but something about this one specific account sending to Gmail fails. The error we get is just telling us that sending to the user xxxxx@gmail.com failed. In order to troubleshoot that, I'm looking for more detail than that. #InterSystems IRIS 1 4 0 178
Article David Hockenbroch · Nov 5, 2024 7m read Recognizing Barcodes With Embedded Python As we keep updating our software, we often realize that we require more and more modern solutions. So far, only one major piece of our software relies on reading barcodes in documents and images. Since Cache did not have a means of reading barcodes in the past, we have always achieved our goals by using a Visual Basic 6 application. However, it is no longer an ideal solution because it is currently complicated to maintain it. IRIS also lacks this capability, but it has recently got an option that makes up for it: embedded Python! #Code Snippet #Coding Guidelines #Embedded Python #JSON #ObjectScript #Python #Tips & Tricks #InterSystems IRIS 9 2 1 499
Article David Hockenbroch · Oct 14, 2024 9m read What's the Catch? Many programming languages use the try-and-catch construct to handle runtime errors gracefully. If the code within the try block encounters an error, it will throw an exception to the catch block, where the error handling occurs. #Beginner #Code Snippet #Coding Guidelines #Debugging #Error Handling #ObjectScript #Tips & Tricks #InterSystems IRIS 6 1 3 368
Question David Hockenbroch · Oct 12, 2024 Embedded Python - Errors with Numpy When I install the numpy package on Python on my PC using: pip install numpy I can use it in python on my machine. If I do: pip install --target C:\InterSystems\IRIS\mgr\python numpy I get errors any time I try to import it in embedded python. #Embedded Python #InterSystems IRIS 0 4 0 486
Article David Hockenbroch · Sep 11, 2024 9m read Dates with InterSystems Do not let the title of this article confuse you; we are not planning to take the InterSystems staff out to a fine Italian restaurant. Instead, this article will cover the principles of working with date and time data types in IRIS. When we use these data types, we should be aware of three different conversion issues: Converting between internal and ODBC formats. Converting between local time, UTC, and Posix time. Converting to and from various date display formats. #Code Snippet #ObjectScript #SQL #Tips & Tricks #InterSystems IRIS 14 4 5 690
Question David Hockenbroch · Aug 20, 2024 Override a Method in VS Code? Is there a wizard to override pieces of class (parameters, properties, methods, etc.) like there is in Studio? I can't find this functionality anywhere. If it's not there, it's certainly a piece I'll sorely miss as we transition to VS Code. #ObjectScript #VSCode #InterSystems IRIS 0 2 1 273
Article David Hockenbroch · Jul 16, 2024 6m read Method or Class Method? For programmers new to ObjectScript, one question will inevitably arise: “What is the difference between methods and class methods?” A typical answer would be: “A class method applies to a class, but a method applies to an instance of that class.” While that answer is correct, it lacks important information on how these methods di #Beginner #ObjectScript #InterSystems IRIS 15 2 6 557
Article David Hockenbroch · May 9, 2024 9m read Microsoft 365 - Events and Tasks In our previous article, we explored how to send emails through Microsoft 365 using the Graph API. Since then, an anonymous client reached out to me about setting up some other methods of notifications through that API. #API #Code Snippet #ObjectScript #Tips & Tricks #Tutorial #InterSystems IRIS 1 0 1 318
Article David Hockenbroch · Apr 25, 2024 3m read Making A Variable Watch Itself I came up with a challenge for myself to come up with a way to make a variable watch itself for a certain value and do something when it hits that value without having to check it every time something touches it. Basically, a way to say "if at any point during the execution of this code, if x = 0 (or whatever the condition is) do this thing." The class I ended up with watches a %Status: #Code Snippet #Error Handling #ObjectScript #Tips & Tricks #InterSystems IRIS 3 0 0 327
Article David Hockenbroch · Apr 2, 2024 9m read Emailing with Office 365 and ObjectScript One of the most common kinds of integration we are asked to do is emailing. One of the most typical email services our customers use is Microsoft’s Office 365. After setting up the right configuration on the Microsoft side, we can email from IRIS with two HTTP requests. #API #Authentication #Code Snippet #JSON #OAuth2 #ObjectScript #REST API #InterSystems IRIS 11 9 6 847
Article David Hockenbroch · Feb 19, 2024 7m read Reserving a License “I have been waiting for thirty seconds for service. This is outrageous! #Access control #Authentication #ObjectScript #Security #System Administration #Tips & Tricks #InterSystems IRIS 4 0 0 561
Article David Hockenbroch · Jan 24, 2024 7m read Securing xDBC Connections with ServerInitCode The ideal number of table permissions to assign for your users is zero. Permissions should be granted upon sign-in based on the application used for access. For web applications, we have a simple way of doing this by appointing application roles, matching roles, and required resources in the System Management Portal. ODBC and JDBC connections present a different problem, however, especially when third-party applications are involved. As providers of an ERP system, our customers often wish to be able to employ various software packages to integrate with or report on their data. Many of these programs are capable of running any kind of query. Yet, letting them do that can be devastating to a customer’s data. #Access control #Code Snippet #JDBC #ODBC #Security #System Administration #InterSystems IRIS 3 0 4 333
Article David Hockenbroch · Jan 4, 2024 22m read The Security Package - REST API Considerations So far, we have covered how to use ObjectScript to manage users, roles, resources, and applications. There are a few other classes in this package that work similarly to the ones mentioned above. However, these four classes are the ones everyone will have to use to manage their application security. #Access control #API #ObjectScript #REST API #Security #InterSystems IRIS 5 2 3 450
Article David Hockenbroch · Nov 2, 2023 9m read The Security Package - Managing Applications Programatically Here in %SYS, we have already examined users, resources, and roles. Now that we know how to set all of that up, we should give it a purpose. Next we will talk about applications! As you may expect, we will see various identical class methods defined here that we have seen in the previous classes. However, some of them will have some tiny yet significant differences. #Access control #Authentication #ObjectScript #System Administration #InterSystems IRIS 6 1 3 486