### Hierarchy

- Censor

## Index

### Properties

- CENSOR_RESPONSE
- INTERNAL_CUSTOM_CENSORED_HEADERS
- MAIN_CENSORED_HEADERS
- MAIN_CENSORED_OPTIONS
- MAIN_SECURE_PROMPT_OPTIONS
- NULL_SESS_OBJ_MSG
- mCensoredOptions
- mConfig
- mSchema

### Accessors

- CENSORED_OPTIONS
- CUSTOM_CENSORED_HEADERS
- DEFAULT_CENSORED_HEADERS
- DEFAULT_CENSORED_OPTIONS
- SECURE_PROMPT_OPTIONS
- profileSchemas

### Methods

- addCensoredHeader
- addCensoredOption
- censorCLIArgs
- censorObject
- censorRawData
- censorSession
- censorYargsArguments
- handleSchema
- isSecureValue
- isSpecialValue
- mCensorObject
- replaceValsInSess
- setCensoredOptions
- setProfileSchemas

## Properties

### Static Readonly CENSOR_RESPONSE

CENSOR_RESPONSE: "****" = "****"

- Defined in @zowe/imperative/src/censor/src/Censor.ts:44

### Static Private INTERNAL_CUSTOM_CENSORED_HEADERS

INTERNAL_CUSTOM_CENSORED_HEADERS: string[] = []

- Defined in @zowe/imperative/src/censor/src/Censor.ts:50

### Static Private Readonly MAIN_CENSORED_HEADERS

MAIN_CENSORED_HEADERS: string[] = ["Authorization", "Cookie", "Proxy-Authorization"]

- Defined in @zowe/imperative/src/censor/src/Censor.ts:39

### Static Private Readonly MAIN_CENSORED_OPTIONS

MAIN_CENSORED_OPTIONS: string[] = ["auth", "authentication", "basicAuth", "base64EncodedAuth", "certFilePassphrase", "credentials","pw", "pass", "password", "passphrase", "tv", "tokenValue"]

- Defined in @zowe/imperative/src/censor/src/Censor.ts:36

Basic censorship items - list definitions & initialiazations, etc. *

### Static Private Readonly MAIN_SECURE_PROMPT_OPTIONS

MAIN_SECURE_PROMPT_OPTIONS: string[] = ["keyPassphrase", "password", "passphrase", "tokenValue", "user"]

- Defined in @zowe/imperative/src/censor/src/Censor.ts:41

### Static Readonly NULL_SESS_OBJ_MSG

NULL_SESS_OBJ_MSG: "Null session object was passed to API" = "Null session object was passed to API"

- Defined in @zowe/imperative/src/censor/src/Censor.ts:47

### Static Private mCensoredOptions

mCensoredOptions: Set<string> = new Set([...this.DEFAULT_CENSORED_OPTIONS,...this.DEFAULT_CENSORED_HEADERS,...this.CUSTOM_CENSORED_HEADERS])

- Defined in @zowe/imperative/src/censor/src/Censor.ts:81

### Static Private mConfig

mConfig: Config = null

- Defined in @zowe/imperative/src/censor/src/Censor.ts:93

### Static Private mSchema

mSchema: ICommandProfileTypeConfiguration[] = null

- Defined in @zowe/imperative/src/censor/src/Censor.ts:98

Singleton implementation of an internal reference to the schema

## Accessors

### Static CENSORED_OPTIONS

- get CENSORED_OPTIONS(): string[]

- - Defined in @zowe/imperative/src/censor/src/Censor.ts:88

  #### Returns string[]

### Static CUSTOM_CENSORED_HEADERS

- get CUSTOM_CENSORED_HEADERS(): string[]

- - Defined in @zowe/imperative/src/censor/src/Censor.ts:66

  #### Returns string[]

### Static DEFAULT_CENSORED_HEADERS

- get DEFAULT_CENSORED_HEADERS(): string[]

- - Defined in @zowe/imperative/src/censor/src/Censor.ts:62

  #### Returns string[]

### Static DEFAULT_CENSORED_OPTIONS

- get DEFAULT_CENSORED_OPTIONS(): string[]

- - Defined in @zowe/imperative/src/censor/src/Censor.ts:53

  #### Returns string[]

### Static SECURE_PROMPT_OPTIONS

- get SECURE_PROMPT_OPTIONS(): string[]

- - Defined in @zowe/imperative/src/censor/src/Censor.ts:71

  #### Returns string[]

### Static profileSchemas

- get profileSchemas(): ICommandProfileTypeConfiguration[]

- - Defined in @zowe/imperative/src/censor/src/Censor.ts:103

  Helper method to get an internal reference to the loaded profiles

  #### Returns ICommandProfileTypeConfiguration[]

## Methods

### Static addCensoredHeader

- addCensoredHeader(header: string): void

- - Defined in @zowe/imperative/src/censor/src/Censor.ts:185

  Add a header to censor

  #### Parameters

  - ##### header: string

    The name of the header to censor

  #### Returns void

### Static Private addCensoredOption

- addCensoredOption(option: string): void

- - Defined in @zowe/imperative/src/censor/src/Censor.ts:172

  Add a censored option, including it's camelCase and kebabCase versions

  #### Parameters

  - ##### option: string

    The option to censor

  #### Returns void

### Static censorCLIArgs

- censorCLIArgs(args: string[]): string[]

- - Defined in @zowe/imperative/src/censor/src/Censor.ts:300

  Copy and censor any sensitive CLI arguments before logging/printing

  #### Parameters

  - ##### args: string[]

    The args list to censor

  #### Returns string[]

### Static censorObject

- censorObject(data: Record<string, any>): Record<string, any>

- - Defined in @zowe/imperative/src/censor/src/Censor.ts:353

  Copy and censor any sensitive CLI arguments before logging/printing

  #### Parameters

  - ##### data: Record<string, any>

    the data to censor

  #### Returns Record<string, any>

  - the censored data

### Static censorRawData

- censorRawData(data: string, category?: string): string

- - Defined in @zowe/imperative/src/censor/src/Censor.ts:319

  Copy and censor any sensitive CLI arguments before logging/printing

  #### Parameters

  - ##### data: string

    the data to censor

  - ##### Default value category: string = ""

  #### Returns string

  - the censored data

### Static censorSession

- censorSession(sessObj: any): string

- - Defined in @zowe/imperative/src/censor/src/Censor.ts:421

  Censor sensitive data from an session object or a sub-object of a session. The intent is to create a copy of the object that is suitable for logging.

  #### Parameters

  - ##### sessObj: any

    A Session object (or ISession, or availableCreds) to be censored.

  #### Returns string

  - The censored object as a string.

### Static censorYargsArguments

- censorYargsArguments(args: Arguments): Arguments

- - Defined in @zowe/imperative/src/censor/src/Censor.ts:395

  Copy and censor a yargs argument object before logging

  #### Parameters

  - ##### args: Arguments

    the args to censor

  #### Returns Arguments

  - a censored copy of the arguments

### Static Private handleSchema

- handleSchema(profileType: IProfileTypeConfiguration | ICommandProfileTypeConfiguration): void

- - Defined in @zowe/imperative/src/censor/src/Censor.ts:135

  Helper function to handle profile schemas when setting the censored options

  #### Parameters

  - ##### profileType: IProfileTypeConfiguration | ICommandProfileTypeConfiguration

    the profile type configuration to iterate over

  #### Returns void

### Static isSecureValue

- isSecureValue(prop: string): boolean

- - Defined in @zowe/imperative/src/censor/src/Censor.ts:224

  Identifies if a property is a secure property

  #### Parameters

  - ##### prop: string

    The property to check

  #### Returns boolean

  - True if the property is secure; False otherwise

### Static isSpecialValue

- isSpecialValue(prop: string): boolean

- - Defined in @zowe/imperative/src/censor/src/Censor.ts:201

  Specifies whether a given property path (e.g. "profiles.lpar1.properties.host") is a special value or not. Special value: Refers to any value defined as secure in the schema definition. These values should be already masked by the application (and/or plugin) developer.

  #### Parameters

  - ##### prop: string

    Property path to determine if it is a special value

  #### Returns boolean

  True - if the given property is to be treated as a special value; False - otherwise

### Static Private mCensorObject

- mCensorObject(data: Record<string, any>, secureValues: any[]): Record<string, any>

- - Defined in @zowe/imperative/src/censor/src/Censor.ts:376

  Copy and censor over an object

  #### Parameters

  - ##### data: Record<string, any>

    the data to censor

  - ##### secureValues: any[]

  #### Returns Record<string, any>

  - the censored data

### Static Private replaceValsInSess

- replaceValsInSess(sessObj: any, createCopy: boolean): string

- - Defined in @zowe/imperative/src/censor/src/Censor.ts:437

  Recursively replace sensitive data in an session-related object and any relevant sub-objects.

  #### Parameters

  - ##### sessObj: any

    A Session object (or ISession, or the availableCreds) to be censored.

  - ##### createCopy: boolean

  #### Returns string

  - The censored object as a string.

### Static setCensoredOptions

- setCensoredOptions(censorOpts?: ICensorOptions): void

- - Defined in @zowe/imperative/src/censor/src/Censor.ts:237

  Generate and set the list of censored options. Attempt to source the censored options from the schema, config, and/or command being executed.

  #### Parameters

  - ##### Optional censorOpts: ICensorOptions

    The objects to use to gather options that should be censored

  #### Returns void

### Static setProfileSchemas

- setProfileSchemas(_schemas: IProfileTypeConfiguration[] | Map<string, IProfileSchema>): void

- - Defined in @zowe/imperative/src/censor/src/Censor.ts:112

  Helper method to set an internal reference to loaded profiles

  #### Parameters

  - ##### _schemas: IProfileTypeConfiguration[] | Map<string, IProfileSchema>

    The schmas to pass in to set to the logger

  #### Returns void

Generated using TypeDoc