@aleksandar-argead/roz-keychain-plugin
v0.1.0
Published
A Rozenite plugin for inspecting react-native-keychain credentials in React Native DevTools.
Maintainers
Readme
rozenite-keychain-plugin
A Rozenite plugin that provides Keychain inspection for React Native applications.
It lets you inspect and manage the credentials stored by react-native-keychain directly from your React Native DevTools environment.
Features
- Credential Inspection: View every generic-password service stored in the Keychain
- Reveal on Demand: Passwords are masked by default and revealed per row
- Data Management: Add, edit, and delete credentials from the DevTools panel
- Search & Filter: Quickly find services by name
- Blacklist Filtering: Hide sensitive services using a regex pattern
- Agent Tools: Read and mutate credentials programmatically through Rozenite for Agents
Installation
Install the plugin as a dependency:
npm install rozenite-keychain-pluginNote: This plugin requires react-native-keychain as a peer dependency:
npm install react-native-keychainYou also need a project that has Rozenite configured.
Quick Start
1. Install the Plugin
npm install rozenite-keychain-plugin react-native-keychain2. Integrate with Your App
Add the DevTools hook to your React Native app and pass in the Keychain module:
// App.tsx
import * as Keychain from 'react-native-keychain';
import { useKeychainDevTools } from 'rozenite-keychain-plugin';
function App() {
// Enable Keychain DevTools
useKeychainDevTools({
keychain: Keychain,
});
return <YourApp />;
}With blacklist filtering:
function App() {
useKeychainDevTools({
keychain: Keychain,
// Hide any service containing "internal" or the exact "refreshToken" service.
blacklist: /.*internal.*|^refreshToken$/,
});
return <YourApp />;
}3. Access DevTools
Start your development server and open React Native DevTools. You'll find the Keychain panel in the DevTools interface.
How It Works
react-native-keychain stores generic passwords per service. This plugin enumerates all services via getAllGenericPasswordServices() and reads each credential with getGenericPassword({ service }).
Because the Keychain does not emit change events, the panel loads a snapshot on connect and provides a Refresh button to re-read the current state. Credentials created, edited, or deleted from the panel update immediately.
Note: Internet credentials (
getInternetCredentials/setInternetCredentials) are not enumerated becausereact-native-keychaindoes not expose an API to list them. This plugin focuses on generic passwords.
Usage
Once the hook is active, the panel provides:
- Service List: Every stored generic-password service
- Reveal Passwords: Toggle password visibility per credential
- Search: Filter credentials by service name
- Backend Indicator: The secure storage backend reported by the Keychain (when available)
- Add / Edit / Delete: Manage credentials directly from the DevTools panel
Agent Tools
This plugin ships Rozenite for Agents tools via the rozenite-keychain-plugin/sdk entry point:
list-credentialsread-credentialcreate-credentialedit-credentialremove-credential
Development
# Install dependencies
npm install
# Start the Rozenite dev host
npm run dev
# Type-check
npm run typecheck
# Build for publishing
npm run buildLicense
MIT
