2012-05-15 2 views
0

Oracle 인스턴스를 보호하려고 시도하고 있으며 기본 암호 확인 기능이 설정된 정확한 사양을 충족하지 못합니다.password_verify_function이 사용되지 않았습니까?

새로운 기능이 sys에 의해 작성되고 컴파일되었습니다. 이것은 또한 "기본"프로필을 새 사용자가 생성 될 때, 암호 검증이 발생하지 않는 것, 그러나

alter profile default limit 
    password_verify_function custom_function; 

을 password_verify_function로 설정했다. 함수를 컴파일하는 동안 경고 또는 오류가 표시되지 않습니다. 다음은 사용자를 생성하는 방법입니다.

create user stackoverflowexample 
    identified by easy 
    default tablespace encrypted_ts 
    quota unlimited on encrypted_ts 
    profile default; 

내가 알지 못하는 것은 무엇입니까?

답변

0

재현 할 수 없습니다

CREATE OR REPLACE FUNCTION custom_function (
    username VARCHAR2, password VARCHAR2, old_password varchar2) RETURN BOOLEAN 
AS 
BEGIN 
    IF password IS NULL OR length(password) < 10 THEN 
    RAISE_APPLICATION_ERROR(-20001, 'Password length less than 10.'); 
    ELSE 
    RETURN TRUE; 
    END IF; 
END custom_function; 
/
-- FUNCTION CUSTOM_FUNCTION compiled 

ALTER PROFILE DEFAULT LIMIT PASSWORD_VERIFY_FUNCTION custom_function; 
-- profile DEFAULT altered. 

CREATE USER stackoverflowexample IDENTIFIED BY easy; 
-- SQL Error: ORA-28003: password verification for the specified password failed 

CREATE USER stackoverflowexample IDENTIFIED BY easy567890; 
-- user STACKOVERFLOWEXAMPLE created.