### Hierarchy

- Censor

## Index

### Properties

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

### Accessors

- CENSORED_OPTIONS
- DEFAULT_CENSORED_OPTIONS
- SECURE_PROMPT_OPTIONS
- profileSchemas

### Methods

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

## Properties

### Static Readonly CENSOR_RESPONSE

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

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

### 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:39

### 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:46

### Static Private mCensoredOptions

mCensoredOptions: Set<string> = new Set(this.DEFAULT_CENSORED_OPTIONS)

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

### Static Private mConfig

mConfig: Config = null

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

### Static Private mSchema

mSchema: ICommandProfileTypeConfiguration[] = null

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

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:72

  #### Returns string[]

### Static DEFAULT_CENSORED_OPTIONS

- get DEFAULT_CENSORED_OPTIONS(): string[]

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

  #### Returns string[]

### Static SECURE_PROMPT_OPTIONS

- get SECURE_PROMPT_OPTIONS(): string[]

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

  #### Returns string[]

### Static profileSchemas

- get profileSchemas(): ICommandProfileTypeConfiguration[]

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

  Helper method to get an internal reference to the loaded profiles

  #### Returns ICommandProfileTypeConfiguration[]

## Methods

### Static Private addCensoredOption

- addCensoredOption(option: string): void

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

  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:271

  Copy and censor any sensitive CLI arguments before logging/printing

  #### Parameters

  - ##### args: string[]

    The args list to censor

  #### Returns string[]

### Static censorRawData

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

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

  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:350

  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:324

  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:119

  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:195

  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:172

  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 replaceValsInSess

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

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

  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:208

  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:96

  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