Type safe secure logging

Aspects of the disclosure relate to providing type safe secure logging. A computing platform may receive application code comprising one or more calls to one or more logging methods. Subsequently, the computing platform may compile the application code comprising the one or more calls to the one or more logging methods to produce a compiled software application. During the compiling of the application code comprising the one or more calls to the one or more logging methods, the computing platform may enforce one or more type-based secure logging rules on the application code comprising the one or more calls to the one or more logging methods. Thereafter, the computing platform may store the compiled software application. In some embodiments, enforcing the one or more type-based secure logging rules may include allowing logging of one or more predetermined classes of objects.

TECHNICAL FIELD

Aspects of the disclosure relate to data processing and software development, installation, and management. In particular, one or more aspects of the disclosure relate to software program development tools that provide type safe secure logging features.

BACKGROUND

Software developers may use logging systems to capture data associated with the execution of a particular software application, as such data may be useful to developers for various purposes, including debugging and optimizing the application. In some instances, however, it may be difficult to prevent the logging of data that should not be logged, such as data that includes passwords or other secret information, particularly while also optimizing for the efficiency of the software code and for the performance of the one or more computer systems that may execute the code and/or provide the logging functions.

SUMMARY

Aspects of the disclosure provide effective, efficient, scalable, and convenient technical solutions that address and overcome the technical problems associated with logging data associated with the execution of software applications. In particular, one or more aspects of the disclosure provide software program development tools having type safe secure logging features.

As illustrated in greater detail below, aspects of the disclosure provide features that improve the operation of computer systems by providing more secure and more efficient ways in which one computer system may log data to another computer system. In addition, some of the features discussed in greater detail below provide these technical improvements at compile-time as program code is being compiled, rather than at run-time as a program is being executed, so as to prevent the inadvertent logging of secret information. For example, a cloud computing platform that provides virtualization and/or remote desktops to end-user computing devices may log data indicating when particular virtualized sessions and/or remote desktops are created, data indicating what devices are requesting and/or accessing such sessions and/or desktops, data indicating what methods are being entered and/or exited by the computing platform, and/or other data associated with the operation of the computing platform. By implementing one or more aspects of the disclosure, such a computing platform may be configured to securely and efficiently log such data to one or more remote data logging systems while preventing the logging of secret information.

In accordance with one or more embodiments, a computing platform having at least one processor, a memory, and a communication interface may receive application code comprising one or more calls to one or more logging methods. Subsequently, the computing platform may compile the application code comprising the one or more calls to the one or more logging methods to produce a compiled software application. During the compiling of the application code comprising the one or more calls to the one or more logging methods, the computing platform may enforce one or more type-based secure logging rules on the application code comprising the one or more calls to the one or more logging methods. Thereafter, the computing platform may store the compiled software application.

In some embodiments, prior to receiving the application code comprising the one or more calls to the one or more logging methods, the computing platform may receive one or more type-safe logging rules. Subsequently, the computing platform may generate a type-safe secure logging library based on the one or more type-safe logging rules, and the computing platform may store the type-safe secure logging library.

In some embodiments, generating the type-safe secure logging library based on the one or more type-safe logging rules may include defining one or more classes of objects as being safe for logging. In some embodiments, generating the type-safe secure logging library based on the one or more type-safe logging rules may include defining one or more interfaces for asserting that one or more specific objects are safe for logging. In some embodiments, generating the type-safe secure logging library based on the one or more type-safe logging rules may include defining one or more logging methods that only accept one or more safe types of objects for logging data with one or more logging systems. In some embodiments, the one or more logging methods defined in the type-safe secure logging library may cause the compiled software application to log data with at least one specific logging system when the compiled software application is executed.

In some embodiments, receiving the application code comprising the one or more calls to the one or more logging methods may include receiving, via the communication interface, the application code comprising the one or more calls to the one or more logging methods from a first developer computing device.

In some embodiments, prior to compiling of the application code comprising the one or more calls to the one or more logging methods, the computing platform may send, via the communication interface, to a second developer computing device, a code review notification.

In some embodiments, after sending the code review notification to the second developer computing device, the computing platform may receive, via the communication interface, from the second developer computing device, a code review request. Responsive to receiving the code review request, the computing platform may send, via the communication interface, to the second developer computing device, the application code comprising the one or more calls to the one or more logging methods. Subsequently, the computing platform may receive, via the communication interface, from the second developer computing device, code review results information. Responsive to receiving the code review results information, the computing platform may send, via the communication interface, to the first developer computing device, a code review status notification.

In some embodiments, prior to compiling of the application code comprising the one or more calls to the one or more logging methods, the computing platform may receive, via the communication interface, from the first developer computing device, a request to compile the application code comprising the one or more calls to the one or more logging methods.

In some embodiments, enforcing the one or more type-based secure logging rules on the application code comprising the one or more calls to the one or more logging methods may include allowing logging of one or more predetermined classes of objects.

In some embodiments, enforcing the one or more type-based secure logging rules on the application code comprising the one or more calls to the one or more logging methods may include detecting an attempt to log at least one unsafe type of object, and in response to detecting the attempt to log the at least one unsafe type of object, generating an error message.

In some embodiments, enforcing the one or more type-based secure logging rules on the application code comprising the one or more calls to the one or more logging methods may include allowing logging of one or more potentially unsafe types of objects based on the one or more potentially unsafe types of objects being wrapped in a safe-logging wrapper.

In some embodiments, the computing platform may send, via the communication interface, to a first developer computing device, the compiled software application. In some embodiments, the computing platform may push, via the communication interface, to one or more production servers, the compiled software application.

DETAILED DESCRIPTION

One or more aspects of the disclosure provide software program development tools having type safe secure logging features. In one or more arrangements, a library of type-safe methods is provided that helps to ensure that developers do not make mistakes by logging security-sensitive information. For instance, some existing logging libraries may be exclusively string-based and might not provide a way to indicate to the library if a string is safe for logging or if the string potentially could contain sensitive information. As a result, incidents may arise in which improper information may be logged to third-party systems. These incidents may occur because developers may be writing code that simply logs the variables that are available on hand, such as logging hypertext transfer protocol (HTTP) payloads and/or other message payloads blindly, without considering the nature of the data contained within such payloads.

To address these and other issues, one or more aspects of the disclosure may, using type safety, require a developer to log safe primitives and/or explicitly assert the safety of a message being logged. For example, a logging library may be provided that includes type-safe logging methods that require any properties passed in to be instances of a safe-logging interface or to be known-safe primitive types, such as int or bool types. In addition, for a developer to log a string, the developer might need to construct a container object for the string, where the container object implements the safe-logging interface (e.g., “new KnownSafe(mystring)”). These assertions may provide a convenient red flag for code reviews to identify and evaluate, for instance, when checking for logging correctness and safety in program source code. In addition, helper methods may be provided that allow for simple concatenation and other string operations on multiple “safe” strings without losing the “safe” designation. In addition, and as a result of using object types to provide secure logging, the type-safe compiler might not compile code that potentially logs security-sensitive information (e.g., because objects passed to the type-safe logging methods must be of one or more predetermined safe types).

FIGS. 1A and 1Bdepict an illustrative computing environment for providing type safe secure logging in accordance with one or more example embodiments. Referring to FIG.1A, computing environment100may include one or more computing devices and various other computing infrastructure. For example, computing environment100may include a software development computing platform110, one or more production servers120, a first logging computer system130, a second logging computer system140, a first developer computing device150, and a second developer computing device160.

As discussed in greater detail below, software development computing platform110may include one or more computing devices configured to perform one or more functions described herein. Production servers120may include one or more server computing devices configured to host and/or otherwise provide various applications, including one or more enterprise applications and/or one or more web applications, to various users, including one or more enterprise users.

Logging computer system130may include one or more computing devices, such as one or more server computing devices, configured to receive and/or store data for logging from one or more other systems and/or devices included in computing environment100. Logging computer system140similarly may include one or more computing devices, such as one or more server computing devices, configured to receive and/or store data for logging from one or more other systems and/or devices included in computing environment100. In some instances, logging computer system130may be configured to log first data associated with a first set of applications, and logging computer system140may be configured to log second data associated with a second set of applications different from the first set of applications.

Developer computing device150may be a computing device, such as a desktop computing device or mobile computing device, configured to be used by a first software application developer. Developer computing device160similarly may be a computing device, such as a desktop computing device or mobile computing device, configured to be used by a second software application developer different from the first software application developer. For instance, the user of developer computing device160may be a manager or supervisor of the user of developer computing device150who may review software application code written by the user of developer computing device150.

Computing environment100also may include one or more networks, which may interconnect one or more of software development computing platform110, production servers120, logging computer system130, logging computer system140, developer computing device150, and developer computing device160. For example, computing environment100may include network170, which may include one or more public networks, one or more private networks, and/or one or more sub-networks (e.g., local area networks (LANs), wide area networks (WANs), or the like).

In one or more arrangements, software development computing platform110, production servers120, logging computer system130, logging computer system140, developer computing device150, and developer computing device160may include one or more processors, memories, communication interfaces, storage devices, and/or other components. In addition, and as illustrated in greater detail below, any and/or all of the computing devices included in computing environment100may, in some instances, be special-purpose computing devices configured to perform specific functions

Referring toFIG. 1B, software development computing platform110may include one or more processors111, one or more memories112, and one or more communication interfaces113. A data bus may interconnect the one or more processors111, the one or more memories112, and the one or more communication interfaces113. Communication interface113may be a network interface configured to support communication between software development computing platform110and one or more networks (e.g., network170or the like). Memory112may include one or more program modules having instructions that when executed by processor111cause software development computing platform110to perform one or more functions described herein and/or one or more databases and/or other libraries that may store and/or otherwise maintain information which may be used by such program modules and/or processor111.

In some instances, the one or more program modules and/or databases may be stored by and/or maintained in different memory units of software development computing platform110and/or by different computing devices that may form and/or otherwise make up software development computing platform110. For example, memory112may have, store, and/or include a software code handling module112a, a software code database112b, a secure logging module112c, a secure logging database112d, and a software code review module112e. Software code handling module112amay include executable instructions that enable and/or cause software development computing platform110to receive software application code from various other computing devices, store software application code, compile software application code, and/or perform other functions. Software code database112bmay store and/or maintain software application code and/or other information that may be used by software development computing platform110. Secure logging module112cmay include executable instructions that enable and/or cause software development computing platform110to enforce one or more type-safe secure logging rules when compiling software application code and/or enable and/or cause software development computing platform110to perform other functions. Secure logging database112dmay store and/or maintain one or more type-safe secure logging libraries and/or other information that may be used by software development computing platform110. Software code review module112emay include executable instructions that enable and/or cause software development computing platform110to provide one or more code review functions, such as notifying developers about code available for review and/or receiving code review results information, and/or enable and/or cause software development computing platform110to perform other functions.

FIGS. 2A, 2B, 2C, and 2Ddepict an illustrative event sequence for providing type safe secure logging in accordance with one or more example embodiments. Referring toFIG. 2A, at step201, software development computing platform110may receive one or more type-safe logging rules. For example, at step201, software development computing platform110may receive one or more type-safe logging rules from one or more other systems and/or devices, such as logging computer system130, logging computer system140, developer computing device150, and/or developer computing device160, and/or from one or more users of such systems and/or devices. The one or more type-safe logging rules may, for instance, define one or more types of programmatic objects as being safe for logging, such as particular classes of objects that may be defined and/or used in software application programming code. Additionally or alternatively, the one or more type-safe logging rules may, for instance, provide for and/or define one or more programmatic interfaces and/or methods for asserting and/or declaring that a particular object is safe for logging, as discussed in greater detail below.

At step202, software development computing platform110may generate a type-safe secure logging library. For example, at step202, software development computing platform110may generate a type-safe secure logging library based on the one or more type-safe logging rules. In generating the type-safe secure logging library, software development computing platform110may create and/or store one or more dynamic library files and/or other programmatic resources that define one or more programmatic classes as being safe for logging and/or that further define one or more programmatic interfaces for asserting that particular instances of classes and/or particular objects are safe for logging. Additionally or alternatively, in generating the type-safe secure logging library, software development computing platform110may create and/or store one or more dynamic library files and/or other programmatic resources that define one or more logging methods which only accept safe classes and/or safe objects to be logged with one or more logging systems.

In some embodiments, generating the type-safe secure logging library based on the one or more type-safe logging rules may include defining one or more classes of objects as being safe for logging. For example, in generating the type-safe secure logging library based on the one or more type-safe logging rules at step202, software development computing platform110may define one or more classes of objects as being safe for logging, such as int, bool, float, and/or other classes of programmatic objects that cannot contain secret information, such as a password or other secret.

In some embodiments, generating the type-safe secure logging library based on the one or more type-safe logging rules may include defining one or more interfaces for asserting that one or more specific objects are safe for logging. For example, in generating the type-safe secure logging library based on the one or more type-safe logging rules at step202, software development computing platform110may define one or more interfaces for asserting that one or more specific objects are safe for logging, such as one or more programmatic interfaces for wrapping string objects and/or other objects in a safe-logging wrapper to assert that the wrapped objects do not include secret information and to thereby allow the wrapped objects to be passed to one or more logging systems for logging.

In some embodiments, generating the type-safe secure logging library based on the one or more type-safe logging rules may include defining one or more logging methods that only accept one or more safe types of objects for logging data with one or more logging systems. For example, in generating the type-safe secure logging library based on the one or more type-safe logging rules at step202, software development computing platform110may define one or more logging methods that only accept one or more safe types of objects for logging data with one or more logging systems (e.g., logging computer system130, logging computer system140). For instance, software development computing platform110may define one or more logging methods that only accept objects of int, bool, float, and/or other predetermined safe classes (which may, e.g., not include secret information due to the nature of such classes of objects) and objects that are wrapped by and/or inherit from a safe-logging interface (which may, e.g., not include secret information because the developer has coded the application in a particular way and asserted that the wrapped objects would not include secret information).

In some embodiments, the one or more logging methods defined in the type-safe secure logging library may cause a compiled software application to log data with at least one specific logging system when the compiled software application is executed. For example, the one or more logging methods defined in the type-safe secure logging library (which may, e.g., be generated by software development computing platform110at step202) may cause a compiled software application to log data with at least one specific logging system (e.g., logging computer system130, logging computer system140) when the compiled software application is executed.

At step203, software development computing platform110may store the type-safe secure logging library generated at step202in a database (e.g., secure logging database112d). For example, at step203, software development computing platform110may store the type-safe secure logging library.

At step204, developer computing device150may receive developer input defining application code. For instance, at step204, developer computing device150may receive input defining software application code from a user of developer computing device150, and the software application code may include one or more calls to one or more logging methods. Referring toFIG. 2B, at step205, developer computing device150may send the application code to software development computing platform110(e.g., for validation, compilation, and/or storage).

At step206, software development computing platform110may receive the application from developer computing device150. For example, at step206, software development computing platform110may receive application code comprising one or more calls to one or more logging methods. In some embodiments, receiving the application code comprising the one or more calls to the one or more logging methods may include receiving, via the communication interface, the application code comprising the one or more calls to the one or more logging methods from a first developer computing device. For example, in receiving the application code comprising the one or more calls to the one or more logging methods at step206, software development computing platform110may receive, via the communication interface (e.g., communication interface113), the application code comprising the one or more calls to the one or more logging methods from a first developer computing device (e.g., developer computing device150).

At step207, software development computing platform110may send a code review notification to developer computing device160. For example, at step207, prior to compiling the application code comprising the one or more calls to the one or more logging methods, software development computing platform110may send, via the communication interface (e.g., communication interface113), to a second developer computing device (e.g., developer computing device160), a code review notification. The code review notification may, for instance, prompt a user of developer computing device160to review the application code and/or prompt the user of developer computing device160to provide input indicating whether the application complies with one or more logging policies.

At step208, software development computing platform110may receive a code review request from developer computing device160(e.g., requesting to review the application code in response to the notification sent at step207). For example, at step208, after sending the code review notification to the second developer computing device (e.g., developer computing device160), software development computing platform110may receive, via the communication interface (e.g., communication interface113), from the second developer computing device (e.g., developer computing device160), a code review request.

Referring toFIG. 2C, at step209, software development computing platform110may send the application code to developer computing device160for review. For example, at step209, responsive to receiving the code review request, software development computing platform110may send, via the communication interface (e.g., communication interface113), to the second developer computing device (e.g., developer computing device160), the application code comprising the one or more calls to the one or more logging methods. In some instances in sending the application code comprising the one or more calls to the one or more logging methods to developer computing device160, software development computing platform110may cause developer computing device160to display and/or otherwise present one or more graphical user interfaces. For example, software development computing platform110may cause developer computing device160to display and/or otherwise present one or more graphical user interfaces similar to graphical user interface300, which is illustrated inFIG. 3, and/or graphical user interface400, which is illustrated inFIG. 4.

As seen inFIGS. 3 and 4, graphical user interface300and graphical user interface400may include text and/or other information associated with the application code to be reviewed, as well as one or more controls prompting and/or allowing the user of developer computing device160to provide input indicating whether the application code complies with one or more safe logging policies. In addition, graphical user interface300and graphical user interface400, as shown inFIGS. 3 and 4, include sample application code illustrating an example of code that causes the logging of one or more safe object types. In particular, the sample application code begins inFIG. 3and continues inFIG. 4.

In the sample application code illustrated inFIGS. 3 and 4, the .Safe( ) method will only succeed if the items passed into it are instances of the interface ISafeLog, or if the string is a compile-time constant. The .Unsafe( ) method indicates that the items contained within are string that, although the compiler cannot determine the safety of the string, the developer is attesting that the string is safe to log. During a code review, a code reviewer can find all calls to the .Unsafe( ) method and audit those. For example, it may be safe to log a username, but it might not be safe to log a password. This approach helps narrow down the focus of what a developer must review for “safety” during a code review. In the example illustrated inFIGS. 3 and 4, the developer performing the code review does not have to review “context” but does have to review that “credentials.UserName” and “result.ErrorMessage” cannot possibly contain sensitive information.

At step210, software development computing platform110may receive code review results information from developer computing device160. For example, at step210, software development computing platform110may receive, via the communication interface (e.g., communication interface113), from the second developer computing device (e.g., developer computing device160), code review results information, such as information approving or rejecting the application code, information indicating whether the application code complies with one or more safe logging policies, information identifying one or more comments on and/or changes to the application code, and/or other information.

At step211, software development computing platform110may send a code review status notification to developer computing device150. For example, at step211, responsive to receiving the code review results information, software development computing platform110may send, via the communication interface (e.g., communication interface113), to the first developer computing device (e.g., developer computing device150), a code review status notification. Such a notification may, for instance, include the code review results information received by software development computing platform110from developer computing device160.

At step212, software development computing platform110may receive a compilation request from developer computing device150. For example, at step212, software development computing platform110may receive, via the communication interface (e.g., communication interface113), from the first developer computing device (e.g., developer computing device150), a request to compile the application code comprising the one or more calls to the one or more logging methods.

Referring toFIG. 2D, at step213, software development computing platform110may compile the application code and enforce one or more type-based secure logging rules at compile time. For example, at step213, software development computing platform110may compile the application code comprising the one or more calls to the one or more logging methods to produce a compiled software application. In addition, during the compiling of the application code comprising the one or more calls to the one or more logging methods, software development computing platform110may enforce one or more type-based secure logging rules on the application code comprising the one or more calls to the one or more logging methods.

In some embodiments, enforcing the one or more type-based secure logging rules on the application code comprising the one or more calls to the one or more logging methods may include allowing logging of one or more predetermined classes of objects. For example, in enforcing the one or more type-based secure logging rules on the application code comprising the one or more calls to the one or more logging methods at step213, software development computing platform110may allow logging of one or more predetermined classes of objects, such as int objects, bool objects, float objects, and/or other predetermined classes of objects. In some instances, in allowing logging of one or more predetermined classes of objects, software development computing platform110may allow compilation of the application to continue without generating one or more error messages (e.g., failing to generate one or more error messages) and/or without halting compilation (e.g., failing to halt compilation).

In some embodiments, enforcing the one or more type-based secure logging rules on the application code comprising the one or more calls to the one or more logging methods may include: detecting an attempt to log at least one unsafe type of object; and in response to detecting the attempt to log the at least one unsafe type of object, generating an error message. For example, in enforcing the one or more type-based secure logging rules on the application code comprising the one or more calls to the one or more logging methods, software development computing platform110may detect an attempt to log at least one unsafe type of object (e.g., based on the application code including a call to a logging method that attempts to log an unsafe type of object). In addition, in response to detecting the attempt to log the at least one unsafe type of object, software development computing platform110may generate an error message, which software development computing platform110may send to developer computing device150and/or developer computing device160. Additionally or alternatively, in response to detecting the attempt to log the at least one unsafe type of object, software development computing platform110may halt compilation and/or stop building the executable application file based on the software application code.

In some embodiments, enforcing the one or more type-based secure logging rules on the application code comprising the one or more calls to the one or more logging methods may include allowing logging of one or more potentially unsafe types of objects based on the one or more potentially unsafe types of objects being wrapped in a safe-logging wrapper. For example, in enforcing the one or more type-based secure logging rules on the application code comprising the one or more calls to the one or more logging methods, software development computing platform110may allow logging of one or more potentially unsafe types of objects based on the one or more potentially unsafe types of objects being wrapped in a safe-logging wrapper. For instance, software development computing platform110may allow logging of one or more potentially unsafe types of objects based on the one or more potentially unsafe types of objects being wrapped in a safe-logging wrapper that attests to the safety of the information being logged, such as a string object that may be considered potentially unsafe because it includes dynamic and/or runtime-generated text content. In addition the safe-logging wrapper may inherit one or more functions, such as a safe assertion function, from a safe logging interface defined in a safe logging library.

For instance, the application code may include one or more method calls that attempt to log a string that includes a server name involved in executing a particular function, and the server name thus may be considered dynamic text at runtime. To log the string that includes the server name, the application code may be written to wrap the string in a safe-logging wrapper, which may inherit attributes from a safe-logging interface or other class defined in the type safe logging library (which may, e.g., be stored by software development computing platform110).

At step214, software development computing platform110may store the compiled software application. For example, after compiling of the application code and enforcing the one or more type-based secure logging rules on the application code, software development computing platform110may store the compiled software application. At step215, software development computing platform110may send the compiled software application to developer computing device150. For example, at step215, software development computing platform110may send, via the communication interface (e.g., communication interface113), to a first developer computing device (e.g., developer computing device150), the compiled software application. At step216, software development computing platform110may push the compiled software application to production servers120for deployment. For example, at step216, software development computing platform110may push, via the communication interface (e.g., communication interface113), to one or more production servers (e.g., production servers120), the compiled software application.

FIG. 5depicts an illustrative method for providing type safe secure logging in accordance with one or more example embodiments. Referring toFIG. 5, at step505, a computing platform having at least one processor, a communication interface, and memory, may receive application code comprising one or more calls to one or more logging methods. At step510, the computing platform may compile the application code comprising the one or more calls to the one or more logging methods to produce a compiled software application. At step515, during the compiling of the application code comprising the one or more calls to the one or more logging methods, the computing platform may enforce one or more type-based secure logging rules on the application code comprising the one or more calls to the one or more logging methods. At step520, the computing platform may store the compiled software application.